ultimatepp/uppdev/SqliteCommander/main.cpp
cxl 4a1c627474 Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

22 lines
451 B
C++

#include <SqlCtrl/SqlCtrl.h>
#include <plugin/sqlite3/Sqlite3.h>
using namespace Upp;
GUI_APP_MAIN
{
FileSel fs;
fs.Type("Sqlite3 database (*.db)", "*.db");
fs.AllFilesType();
LoadFromFile(fs);
bool b = fs.ExecuteOpen("Open sqlite3 database");
StoreToFile(fs);
if(!b) return;
Sqlite3Session sqlite3;
if(!sqlite3.Open(~fs)) {
Exclamation("Can't open database file\n");
return;
}
SQL = sqlite3;
SQLCommander();
}