how can we take the error number . i am using postgresql
i user the methode
int QSqlError::number () const
but it always return -1
y?
pls any body help me
how can we take the error number . i am using postgresql
i user the methode
int QSqlError::number () const
but it always return -1
y?
pls any body help me
Hi,
When you execute a query using QSqlQuery, and it generates an error, Then you can use the QSqlQuery::lastError() to get the QSqlError, Now if the number() returns -1, it just means that there wasn't any error.
We can't solve problems by using the same kind of thinking we used when we created them
cann't you use ..
Qt Code:
To copy to clipboard, switch view to plain text mode
then check it..
----etcQt Code:
To copy to clipboard, switch view to plain text mode
or Try the lastError() as sunil said.
Last edited by wysota; 20th December 2006 at 10:15. Reason: changed [html] to [code]
For more usability use QSqlError::showMessage()
a life without programming is like an empty bottle
mammmuuuu....
Did you get the solution..???
If you got the solution just post it in the forum so that others can use it.
Bookmarks