>
>SET SQLERRORS TO SQLERROR_OBJECT
>SET SQLCONNECTION TO SQL_CONNECTION
>BEGIN TRANSACTION
> SELECT * FROM CUSTOMER INTO CURSOR LOCAL_CURSOR
> UPDATE CUSTOMER SET CUSTOMER_CODE = 122112
> INSERT INTO CUSTOMER ...
> IF SQLERROR_OBJECT.ERROR_CODE # 0
> ROLLBACK
> ENDIF
>END TRANSACTION
>SET SQLCONNECTION TO [LOCAL]
They didn't go to the above level of embedding support for SQL right into the language. But, you can acomplish the above with a farily simple SQL Pass Thru class. As a mater of fact, there is a pretty decent one in the FFC.
BOb
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement