I don't see anywhere a "sqlCmd.Execute()" or whatever the method is to execute the command.
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Don Ireland Sent: Tuesday, May 31, 2011 11:21 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Create DB file and then Create Table - Table FAILS. Ooh. I don't know what happened to that message it was sent as paragraphs. It's kinda hard to read now. Don Ireland -----Original Message----- From: Don Ireland <sql...@donireland.com> To: SQLite <sqlite-users@sqlite.org> Sent: Tue, 31 May 2011 10:18 PM Subject: [sqlite] Create DB file and then Create Table - Table FAILS. I'm hoping someone can help me with this. Using Visual Studio C++, the following code DOES create the DB file. But the table doesn't get created and I'm stumped as to why it won't create the table. SQLiteConnection conn; conn.ConnectionString = "Data Source=D:\Users\Don\Downloads\CashBoxPrefs.dat"; conn.Open(); SQLiteCommand sqlCmd(%conn); sqlCmd.CommandText = "CREATE TABLE IF NOT EXISTS Prefs (SyncEnabled bool,SyncWatchPort int,SyncLoginKey TEXT,SyncAccessKey TEXT, SyncLogFile TEXT, SyncLogClearInterval int,GenLatestBook TEXT, GenBookMRU_0 TEXT,GenBookMRU_1 TEXT, GenBookMRU_2 TEXT, GenBookMRU_3 TEXT, GenBookMRU_4 TEXT);"; But if I run following at the SQLite3.exe from the command line, it DOES create the file and the table. sqlite3 Cashboxprefs.dat sqlite> CREATE TABLE IF NOT EXISTS Prefs (SyncEnabled bool,SyncWatchPort int,SyncLoginKey TEXT,SyncAccessKey TEXT, SyncLogFile TEXT, SyncLogClearInterval int,GenLatestBook TEXT, GenBookMRU_0 TEXT,GenBookMRU_1 TEXT, GenBookMRU_2 TEXT, GenBookMRU_3 TEXT, GenBookMRU_4 TEXT); _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users