![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi. I have to convert some stored procedures from Microsoft SQL Server 2000 to Pervasive. One of the sp's does an insert into a table followed by an insert into an audit table if the first insert is successful. Here's some pseudo code... BEGIN TRANSACTION INSERT INTO TABLE1.... IF @@ERROR <> 0 ROLLBACK TRANSACTION ELSE INSERT INTO AUDIT TABLE... IF @@ERROR <> 0 ROLLBACK TRANSACTION ELSE COMMIT TRANSACTION END IF END IF I got all the transactions statements converted, but cannot find the Pervasive equivalent of @@ERROR. This contains the error status of the most recent statement. 0 = success. I see something similar in Pervasive called SQLSTATE, but I wasn't able to get it to work. If anyone can help, it would be greatly appreciated. Thanks! |
![]() |
| Thread Tools | |
| Display Modes | |
| |