10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Access a Database with Standard SQL Statements• Statements that do not access database tablesTwo examples of this type are the set statement (including set autocommitand set lockmode) and the inquire_sql statement. The set statements donot take part in transactions and cannot be issued inside them.For a list of SQL statements and their syntax, see the Language Reference<strong>Guide</strong> online help.How You Can Use Database ProceduresOpenROAD scripts can call database procedures, which are collections ofstatements managed as a single unit by the Ingres DBMS. Using databaseprocedures provides another way for OpenROAD scripts to access thedatabase.For more information about calling a database procedure, see Writing Scriptsand Procedures (see page 67).Creating a database procedure within an OpenROAD application requires usingthe execute immediate statement.For more information about using the execute immediate statement, see HowYou Can Use the Execute Immediate Statement (see page 155) and theLanguage Reference <strong>Guide</strong> online help.How You Can Use the Execute Immediate StatementYou can use the execute immediate statement to perform any of the followingtasks:• Execute a variety of SQL statements that the 4GL code constructs atruntime.• Execute SQL statements that contain legal SQL syntax that is notrecognized by the OpenROAD compiler, such as:– Creating a database procedure– Issuing statements to a non-Ingres server or a version of the Ingresserver that supports different SQL syntaxWorking with a Database 155

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!