[Solved]sqlite+qt



  • Hi. I'm have problem with Sqlite.

    @QSqlQuery query(db);
    query.exec"INSERT INTO tablename (colum1,colum2) VALUES (1,1),(1,1);"@

    in SQLiteManager this sql-code complete.

    This is action not add data to table, but used code:
    @QSqlQuery query(db);
    query.exec"INSERT INTO tablename (colum1,colum2) VALUES (1,1);"@

    full good.
    error not have in lastError()
    I not have idea for with problem.



  • Hi,

    I am not sure, but I once also had errors with such statements which worked in MySQL workbench but not via API. Try adding a space between the value brakets and the comma (1,1) , (1,1);



  • [quote author="Gerolf" date="1350455734"]Hi,

    I am not sure, but I once also had errors with such statements which worked in MySQL workbench but not via API. Try adding a space between the value brakets and the comma (1,1) , (1,1);[/quote]

    thank you, but it's not work =(
    what's can speed adding records in SQLite?



  • I'm compete my question. I use command synchronous=0 and speed up.
    read man in this www.sqlite.org/pragma.html


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.