Reputation: 742
I am using Visual Studio. Using VC++/MFC and SQLite, how would I programmatically create a database?
Upvotes: 0
Views: 1236
Reputation: 752
You don't have to use a wrapper for doing that. You can simply use the sqlite3_open_v2
function with the SQLITE_OPEN_CREATE
flag:
sqlite3* pDb = NULL;
int rc = sqlite3_open_v2("yourDbName.db", &pDb, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
assert(rc == SQLITE_OK);
Upvotes: 1
Reputation: 1614
You need a Sqlite wrapper for C++.
You can find some here: http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
One example is here: http://www.codeproject.com/Articles/6343/CppSQLite-C-Wrapper-for-SQLite
Upvotes: 0