Results 1 to 2 of 2

Thread: QSqlQuery debug problem

  1. #1
    Join Date
    Sep 2012
    Posts
    44
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QSqlQuery debug problem

    Where is my error:

    Qt Code:
    1. QSqlQuery query;
    2. query.prepare("UPDATE company SET name=:name, city=:city, address=:address, mol=:mol, eik=:eik, vat=:vat, tel=:tel, mail=:mail, iban=:iban, bank=:bank WHERE id=:id ");
    3. query.bindValue(":name", ui->lineEdit_name->text());
    4. query.bindValue(":city", ui->lineEdit_city->text());
    5. query.bindValue(":address", ui->lineEdit_address->text());
    6. query.bindValue(":mol", ui->lineEdit_mol->text());
    7. query.bindValue(":eik", ui->lineEdit_eik->text());
    8. query.bindValue(":vat", ui->lineEdit_vat->text());
    9. query.bindValue(":tel", ui->lineEdit_tel->text());
    10. query.bindValue(":mail", ui->lineEdit_mail->text());
    11. query.bindValue(":iban", ui->lineEdit_iban->text());
    12. query.bindValue(":bank", ui->lineEdit_bank->text());
    13. query.bindValue(":id", "0");
    14. query.exec();
    15. QMessageBox::information(this,"", query.lastError().text());
    To copy to clipboard, switch view to plain text mode 

    i got:
    /companydata.cpp:58: error: invalid use of incomplete type 'struct QSqlError'
    /QtSql/qsqldatabase.h:57: error: forward declaration of 'struct QSqlError'

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSqlQuery debug problem

    Your error is lack of #include <QSqlError>.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. problem in QSqlQuery
    By mammaiap in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2011, 04:59
  2. QSqlQuery problem.
    By coding_neo in forum Newbie
    Replies: 3
    Last Post: 19th October 2011, 02:49
  3. Replies: 1
    Last Post: 18th July 2011, 13:12
  4. QSqlQuery problem
    By MarkoSan in forum Qt Programming
    Replies: 14
    Last Post: 14th January 2008, 23:50
  5. QSqlQuery problem
    By dragon in forum Newbie
    Replies: 5
    Last Post: 22nd December 2006, 18:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.