3 // Implementation of the MainPage class.
7 #include "MainPage.xaml.h"
10 using namespace vsixtest
;
12 using namespace Platform
;
13 using namespace Windows::Foundation
;
14 using namespace Windows::Foundation::Collections
;
15 using namespace Windows::UI::Xaml
;
16 using namespace Windows::UI::Xaml::Controls
;
17 using namespace Windows::UI::Xaml::Controls::Primitives
;
18 using namespace Windows::UI::Xaml::Data
;
19 using namespace Windows::UI::Xaml::Input
;
20 using namespace Windows::UI::Xaml::Media
;
21 using namespace Windows::UI::Xaml::Navigation
;
23 // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
27 InitializeComponent();
31 void MainPage::UseSQLite(void)
34 sqlite3
*pDb
= nullptr;
36 rc
= sqlite3_open_v2("test.db", &pDb
,
37 SQLITE_OPEN_READWRITE
| SQLITE_OPEN_CREATE
, nullptr);
40 throw ref
new FailureException("Failed to open database.");
42 rc
= sqlite3_exec(pDb
, "VACUUM;", nullptr, nullptr, nullptr);
45 throw ref
new FailureException("Failed to vacuum database.");
47 rc
= sqlite3_close(pDb
);
50 throw ref
new FailureException("Failed to close database.");