Hi
I am using sqlite3 from Qt
have added a trigger to a table
i have setup an Abort message in the trigger
My problem is that i am unable to get the message from a qt app, while
i am getting an exact message from Ruby language -
"db.execute( "insert into param_details (param_code,param_value)
values (?,?)",12,'786786')
SQLite3::SQLException: First Digit Should Be 9"
But in Qt
Getting "Error: library routine called out of sequence "
believe something wrong with at
sqlite3 *handle = *static_cast<sqlite3 **>(v.data()); in
1.
QString StrQuery = "insert into
PARAM_DETAILS(PARAM_CODE,PARAM_VALUE) values
2.
(12,'8443211326')";
3.
4.
/* if(!(q5.exec(StrQuery)))
5.
{
6.
qDebug() << q5.lastError();
7.
}*/
8.
if(!(q5.exec(StrQuery)))
9.
{
10.
QVariant v = q5.driver()->handle();
11.
12.
if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0)
13.
{
14.
// v.data() returns a pointer to the handle
15.
sqlite3 *handle = *static_cast<sqlite3 **>(v.data());
16.
if (handle != 0)
17.
{ // check that it is not NULL
18.
qDebug("Error: %s", sqlite3_errmsg(handle));
19.
QMessageBox::about(0,"Hello",sqlite3_errmsg(handle));
20.
}
21.
}
22.
}
please help
regards
Nataraj
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users