This line seems erroneous: SQLiteCommand sqlCmd(%conn); Isn't the 
percent the modulus operator?

Shouldn't it be: SQLiteCommand sqlCmd(&conn);

On 6/1/2011 5:06 PM, Don Ireland wrote:
> 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

Reply via email to