Sqllite sql error call back

how can i know the sql statement which has wronged in error call back when using sql function?

ie:

 cmd[0]=["stmt 1",,error_route]
 cmd[1]=["stmt 2",,error_route]
 cmd[2]=["stmt 3",success_route,error_route]
 sql(db,cmd)

 function error_route(transaction,results)
     ' 1. can i know the sql statement which has error here?
     ' 2. what is transaction argument for?
 end function

 function success_route(transaction,results)
   ....
 end function 

Thanks
Teo

Hi,
I believe the only way to tell the statement is to define separate “error_route” functions for each statement - “error_route1”, “error_route2”, … Then in those functions you know where the error happened.

By the way - you’re aware that statements 2 and 3 use the same cmd[1] entry I assume? probably just an error in this post. should be [1] and [2] of course.
Thomas

Thomas

It is typo error(copy and paste) and amended.

Thanks
Teo