Skip to content
  • 0 Votes
    16 Posts
    2k Views
    J

    @JonB
    sorry for that,

    insert into Dataset(AT) values(?): I know nothing about SQLite. Dataset(AT) is a (syntactically valid) table to insert into, is it?
    Yes, it is valid statement in sqlite.

    Also QSqlQuery::prepare() returns a bool for success/failure, which you should be checking.
    Returns true if the query is prepared successfully; otherwise returns false.

    Plus, you check QSqlDatabase::lastError() after QSqlQuery::exec() fails, but that says
    yes, I got error. like QSqlError("","","");

    I checked again there was a problem in database but it solved thanks alot.
    Now, I'm able to insert data into database from QXlsx file.