Hello
I use QqSqlTableModel and tableView together.
How can i detect SQL server exceptions, errors ? (for example : Key violation, foreign key error etc....)
thnak you Attila
Hello
I use QqSqlTableModel and tableView together.
How can i detect SQL server exceptions, errors ? (for example : Key violation, foreign key error etc....)
thnak you Attila
See QSqlTableModel::lastError() on how to get an SQL error object.
Cheers,
_
Thank you anda_skoa
but i edit the recod in a tableview manually
How can i get a message about the record is saved or not (because of sql error)
thank you Attila
If you run through the model, then it has the error. That's why it is called "lastError".
If you run a QSqlQuery manually, then it has its own error object.
Cheers,
_
Thank you , Sir
Ok. It's working. I have understood.
thank you again
Bookmarks