>SET DATABASE TO dacilsa >lnhandle = SQLCONNECT('coneccion_dacilsa') && lnHandle = 3 >lcCommand = [UPDATE Accounts SET Desc = ALLTRIM(Desc) + ' cambiado' WHERE Number = '100 '] >?SQLEXEC(lnhandle,lcCommand) && Returns -1 >>
LOCAL ARRAY laError(1) ... your code ... IF SQLEXEC(m.lnHandle,m.lcCommand)=-1 AERROR(m.laError) IF m.laError(1,1) = 1526 && ODBC generated error FOR m.lnLoop = 1 TO ALEN(m.laError,1) ? m.laError(m.lnLoop,3) ENDFOR ENDIF ENDIF(not tested - see AERROR() in Help for more details).