Programming Guide : Using 3GL in Your Application : How You Can Use Exec SQL Statements in 3GL Procedures
 
Share this page          
How You Can Use Exec SQL Statements in 3GL Procedures
You can also access the database from your 3GL procedure by using embedded SQL statements.
The current database connection of your 4GL application becomes the current embedded SQL connection when your 3GL procedure is called. You can also use embedded SQL statements to establish new database sessions within a 3GL procedure. But when the procedure completes and control returns to OpenROAD, the application automatically returns to the session in which it was running when the procedure was called.
Take care to ensure that your embedded SQL 3GL procedure cooperates with your 4GL application on their shared session. Your 3GL can impact the shared session in ways that could adversely affect your 4GL application (such as disconnecting the session, or changing the transaction state).