Re: Cascading Delete Referential integrity problem
Posted in 1998
Syed wrote:
>
> Dear Friends,
>
> I have set cascading delete for master details tables, but whenever i
> delete the master it gives me the referential integrity error as follow,
> I have checked all the referential integrity in all
> chid table. i have this errors appeared:
>
> SQL error -692 : Key value for constraint (informix.project_key) is> still being referenced. has occurred.
>
> No changes made to database.
>
> DELETE FROM project WHERE sec_code = ? AND min_code = ? AND ri_code = ?
> AND proj_serial = ? AND proj_state = ? AND proj_title = ? AND> proj_key_words = ? AND pan_id = ?
Sounds like your database does not have logging turned on. No logging -
no transactions. No transactions - no cascading deletes. Check in
onmonitor>status>database or 'SELECT * FROM sysmaster:sysdatabases
WHERE name = "mydatabase"' or get my latest submission to the iiug
archives (utils2_ak) and compile & run listdb7.ec to see your databases
logging status.
If this is your problem you need to do a level zero (0) backup and
include the flags to add logging to your database (ie:
ontape -s -L 0 -U mydatabase ## To add unbuffered logging
Onbar and Onarchive have similar options.
Art S. Kagel