Just guessing here Steve, but have you tried this without it being asynchronous?
~~Bonnie
>I am using SPT as follows:
>
>
>SQLSETPROP(nhandle,'TRANSACTIONS',2)
>SQLSETPROP(nHandle,'Asynchronous',.T.)
>
>lcCmd = "A delete followed by an insert to update a data record"
>
>lnSuccess = 0
>DO WHILE lnSuccess = 0
> lnSuccess = SQLEXEC(nHandle,lcCmd,'SQLResults')
>ENDDO
>
>IF lnSuccess < 1
> SQLROLLBACK(nHandle)
>ELSE
> SQLCOMMIT(nHandle)
>ENDIF
>
>SQLSETPROP(nhandle,'TRANSACTIONS',1)
>
>
>My problem is that even though an error is encountered by the SQL insert command, lnSuccess returns 1. The error is that one string that I am attempting to save is longer than the field. The Query Analyzer reports the error when I issue the SQL Commands there. Since lnSuccess is 1, I commit the transaction but the insert has failed.
>
>From Query Analyzer:
>
>Server: Msg 8152, Level 16, State 9, Line 1
>String or binary data would be truncated.
>The statement has been terminated.
>
>
>Does anyone understand why this is happening?