Hello all,

I started to experiment with SQLite3. I created database with
         rc = sqlite3_exec(m_db, "CREATE TABLE [tblTest] ( [CINDEX] INTEGER 
PRIMARY KEY, [CDATE] DATE, [CDESCR] TEXT, [CAMOUNT] NUMERIC)", callback, 0, 
&zErrMsg);

Then I added some items into table with sqlitebrowser_200.

In my code, I can work with table, get items, etc. But I don't know why 
"INSERT" does not work. I use following:
      sprintf( sqlquery, "INSERT INTO tblTest ( CINDEX, CDATE, CDESCR, 
CAMOUNT ) VALUES ( 5, 2012-08-29, Testitem, 300 )");
      rc = sqlite3_exec(m_db, sqlquery, callback, 0, &zErrMsg);

and getting SQL error "No such column : Testitem". Whatever I write to this 
third position, I get either this error, or "Unrecognized token" in case 
"testitem" begins with number.

I use sqlite3.c source code, WinXP x86, GCC4.6.1 MinGW compiler.

Anybody knows where is the problem ?

Thank you in advance.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to