Triggers and Dynamic SQL... Pre-Version 9
Posted in 2000
Topics: Installation, Setup & Upgrades, Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Triggers, Constraints & Referential Integrity
Hi, Problem: I have to create triggers on a database that will execute stored procedures utilising dynamic SQL and cursors etc. Because the triggers are essential this would seem to rule out ESQL\\C. Also, I have looked at the info for the Dynamic SQL blade that can downloaded to allow Dynamic SQL in SPL and it seems to me to assume Version 9. I am restricted to using Version 7.2 and 7.3... The blade (as far as I can tell) requires the CREATE FUNCTION command (to install the blade) which doesn't seem to be supported in the above Versions. Does anybody know of any way to use Dynamic SQL in this situation? Any ideas would be much appreciated... CHEERS, Greg Greg Bird greg.bird@advdata.com.au
Have the trigger call an SPL procedure that runs an ESQL/C external program. Or have the SPL create a new SPL with the desired text and fire it off. These are the only way in 7.xx. Art S. Kagel Greg Bird wrote: > > Hi, > Problem: I have to create triggers on a database that will execute > stored procedures utilising dynamic SQL and cursors etc. Because the > triggers are essential this would seem to rule out ESQL\\C. > Also, I have looked at the info for the Dynamic SQL blade that can > downloaded to allow Dynamic SQL in SPL and it seems to me to assume Version > 9. I am restricted to using Version 7.2 and 7.3... The blade (as far as I > can tell) requires the CREATE FUNCTION command (to install the blade) which > doesn't seem to be supported in the above Versions. > Does anybody know of any way to use Dynamic SQL in this situation? > Any ideas would be much appreciated... > CHEERS, > Greg > > Greg Bird > greg.bird@advdata.com.au