How to perform transactions across all databases using stored procedures in 4GL?
Posted in 1998
I am using 4GL version 6.05 UD? I want to do the following : DATABASE xxxx MAIN FOREACH Database_cursor with hold --* Execute the stored procedure across all the databases. PREPARE - "EXECUTE Databasename:stored_proc_name(parameters)" DECLARE procedure_cursor with hold for the prepared statement FOREACH procedure_cursor into <return values> END FOREACH --* Database cursor gets closed here. After executing for the first time. END FOREACH END MAIN The stored procedure begins the work and commits the work. The problem is when I come out of the procedure cursor for the first time , it executes fine. But the database cursor gets closed. Moreover, the tables referred in trigger event invoked by the stored procedure doesn't refer to the current database from which it has been called. It refers the Default database xxxx . Is there any work around for this problem? Please help.......... TIA, Hari