sqlca.sqlerrtext

returns the SQL error text of the last SQL command

 

sqlca.select ...
if <sqlca.sqlcode> n<> 0 then
   messagebox=Error : <sqlca.sqlerrtext>
end if

 

 

see SQL error handling