Hi all,
I m trying to create 3tables in my SQlite database. I use the following code.
Qt Code:
  1. QSqlQuery query;
  2. query.exec("create table user (UPI int primary key, firstname varchar, lastname varchar, cos int )");
  3. query.exec("insert into person values(380142, 'Danny', 'Young',10)");
  4. query.exec("insert into person values(102222, 'Christine', 'Holand',23)");
  5.  
  6. //The following requests create the tables, but don't insert the data
  7. query.exec("create table destination (number int primary key,type varchar)");
  8. query.exec("insert into destination values(0022921301074, 'local')");
  9. query.exec("insert into destination values(002217780216, 'international')");
  10.  
  11. //The requests below gives an error message
  12. query.exec("create table callId (id int primary key, ext int)")/*, day varchar, moment varchar,duree int,transfer int, transferExist bool,cosExist bool, number int, cos int)")*/;
  13. query.exec("insert into callId values(' ', '2011-10-28','17:25',128,3300,'true','false',0022921301074,' ')");
  14. query.exec("insert into callId values(' ', '2011-10-29','00:29',128,' ','false','true',002217780216,10)");
To copy to clipboard, switch view to plain text mode 

The error message is "This application has request the Runtime to terminate at an unusual way".

And the debugger show the following message :
Début du débogageASSERT: "idx >= 0 && idx < s" in file ..\..\include/QtCore/../../../../../../ndk_buildrepos/qt-desktop/src/corelib/tools/qvarlengtharray.h, line 107
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Fin du débogage

Kindly help me;
Thanks