The DBACCNOIGN environment variable affects the behavior of the DB–Access utility if an error occurs under one of the following circumstances:
Set the DBACCNOIGN environment variable to 1 to roll back an incomplete transaction if an error occurs while you run the DB–Access utility under either of the preceding conditions.
>>-setenv--DBACCNOIGN--1---------------------------------------><
For example, assume DB–Access runs the following SQL commands:
DATABASE mystore BEGIN WORK INSERT INTO receipts VALUES (cust1, 10) INSERT INTO receipt VALUES (cust1, 20) INSERT INTO receipts VALUES (cust1, 30) UPDATE customer SET balance = (SELECT (balance-60) FROM customer WHERE custid = 'cust1') WHERE custid = 'cust1 COMMIT WORK
Here, one statement has a misspelled table name: the receipt table does not exist. If DBACCNOIGN is not set in your environment, DB–Access inserts two records into the receipts table and updates the customer table. Now, the decrease in the customer balance exceeds the sum of the inserted receipts.
But if DBACCNOIGN is set to 1, messages appear that indicate that DB–Access rolled back all the INSERT and UPDATE statements. The messages also identify the cause of the error so that you can resolve the problem.
You can set DBACCNOIGN to protect data integrity during a LOAD statement, even if DB–Access runs the LOAD statement in menu mode.
Assume you execute the LOAD statement from the DB–Access SQL menu. Forty-nine rows of data load correctly, but the 50th row contains an invalid value that causes an error. If you set DBACCNOIGN to 1, the database server does not insert the forty-nine previous rows into the database. If DBACCNOIGN is not set, the database server inserts the first forty-nine rows.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]