thnks igor ,

the return type of q.exe is bool

bool QSqlQuery::exec ( const QString & query )

q.lasterror() returned 
QSqlError(19, "Unable to fetch row", "constraint failed") 

I dont know how to track this.
i want the trigger's raise error in  QT call.

Thnks
Bala


Igor Tandetnik wrote:
> 
> greensparker wrote:
>> im using QT4.5 and sqlite3
>> 
>> im using BEFORE INSERT TRIGGER for validation purpose
>> [is it good idea to put validation on before_insert_trigger???]
> 
> You could have a CHECK constraint in the table definition instead.
> 
>> IN QT  im inserting as
>> q.exec("insert into PARAM_DETAILS(PARAM_CODE,PARAM_VALUE)
>> values(12,'9789')");
>> 
>> when i execute this insert code in sqlite3 cmd prompt , i got the error.
>> 
>> but how to capture  this err in APPLICAITON?
> 
> Check the return value of QSqlQuery::exec, see also QSqlQuery::lastError
> 
> Igor Tandetnik
> 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-get-the-Trigger%27s-Raise-err-in-Application-tp26091341p26093874.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to