Dear All,
I'm trying to insert some items into table previously created.
1.- I create table : string sqlReq = maketext("CREATE TABLE IF NOT EXISTS identifiant_questionnaire (idTable INTEGER AUTOINCREMENT NOT NULL, codetablet INTEGER,codeutilisateur INTEGER, numeroquestionnaire INTEGER)");
sqlquery(SQLITEDB,sqlReq);
2.- I insert data:
string sqlReq2 = maketext ("INSERT INTO identifiant_questionnaire VALUES (%v,%d, %v, %v)",CODE_ENQUETEUR,noTablet(),CODE_OPERATEUR,IQ_1_NUMERO_DU_QUESTIONNAIRF);
warning ("requete la se %v",sqlReq2);
sqlquery(SQLITEDB,sqlReq2);
But, unfortunately, noone data has been inserted. What i'm doing wrong with insert into?
Thanks in advance for your support!
sqlquery: Insert into issue
sqlquery: Insert into issue
G.VOLNY, a CSProuser from Haiti, since 2004
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: sqlquery: Insert into issue
Your INSERT statement is not valid. See more here:
http://www.sqlitetutorial.net/sqlite-insert/
Your best option is to get a program like DB Browser for SQLite, write and test your queries in it, and then copy the query back into CSPro.
http://www.sqlitetutorial.net/sqlite-insert/
Your best option is to get a program like DB Browser for SQLite, write and test your queries in it, and then copy the query back into CSPro.
Re: sqlquery: Insert into issue
Thanks Greg for your unconditional support and sorry for this very basic request... It was an unbelievable mistake from my own part...
Best Regards,
Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004