qt-interest@trolltech.com
[Top] [All Lists]

[Qt-interest] QSqlDatabase lastError method when using QDataWidgetMapper

Subject: [Qt-interest] QSqlDatabase lastError method when using QDataWidgetMapper
From: bar tomas
Date: Tue, 6 Apr 2010 15:26:17 +0100
Hi,

I'm trying to use the lastError method of the  QSqlDatabase  class to
retrieve errors from insert statements sent to my database using a
QDataWidgetMapper and a QSqlRelationalTableModel.
Although I know there is an error with one of the insert statements
(violates foreign key constraint and no row is inserted in the
database) when I try to print the error, with lastError  that I call
after the submit method of the QDataWidgetMapper , only an empty
string is returned. Does lastError not work with a QDataWidgetMapper?

Many thanks
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest

<Prev in Thread] Current Thread [Next in Thread>
  • [Qt-interest] QSqlDatabase lastError method when using QDataWidgetMapper, bar tomas <=