What is InstantSQL? |
|
< > Connection Statements Query Statements Advanced Statements Status Inquiry Statements Browse Statements Table of Contents
InstantSQL is the solution for easy access to databases using Structured Query Language (SQL) from RM/COBOL. InstantSQL provides SQL connectivity from RM/COBOL applications to any Open Database Connectivity (ODBC) compliant data source, including Relativity data sources. InstantSQL is implemented at compile time with a set of copy files and at runtime with a dynamic link library (DLL) or shared object (SO). For more information on these components, see the topic InstantSQL Components.
Note This help file does not attempt to teach SQL. It is assumed that a developer of InstantSQL-based programs already knows how to read and write SQL statements. A recommended reference for SQL is Understanding the New SQL: A Complete Guide, by Jim Melton and Alan R. Simon, Morgan Kaufmann Publishers, Inc., 1993, ISBN 1-55860-245-3 (paper).
Since InstantSQL uses ODBC, an understanding of SQL as used by ODBC is helpful. Microsoft Corporation provides documentation of ODBC SQL. A particularly useful book is Microsoft ODBC 3.0 Software Development Kit and Programmer's Reference, by Microsoft Corporation; Microsoft Press, 1997, ISBN: 1-57231-516-4 (paper with CD). The SDK includes an extremely useful tool called ODBC Test, which aids in doing quick "what if" tests. There is also an extensive help file that explains ODBC SQL, transactions, and the ODBC API. The SDK also documents the various SQL state values that may be returned by ODBC errors; this error information is necessary if an application is to provide programmed responses to such errors.
InstantSQL is not an ODBC driver. Instead, InstantSQL is an interface that allows access to ODBC drivers using a COBOL-like set of statements. InstantSQL does not expose the full functionality of ODBC, but rather provides a simplified method of accessing data sources with ODBC. Some compromises were necessary in order to provide this simplified access. In some cases, the compromises can be worked around by use of the ODBC handle values, which may be obtained using InstantSQL status inquiry statements, and then by using these handle values in direct ODBC calls. In other cases, InstantSQL may not be appropriate and the application should be written entirely using direct ODBC calls. CodeBridge makes it easier to integrate direct ODBC calls into an RM/COBOL application program.
InstantSQL allows the COBOL program to run as an ODBC 2.x application. This is true even if the driver manager is ODBC 3.x. However, some ODBC 3.x driver features will affect the COBOL application. For example, an ODBC 3.x compliant driver will return more columns in the result set for the browse queries than an ODBC 2.x compliant driver, as described in the browse query topics in this help file.
InstantSQL provides a set of statements that can be used in an RM/COBOL application to access databases using SQL. These statements are used in various patterns as shown in the following flow charts:
Browse Data Sources Flow Chart
Browse Types/Tables/Columns/Indexes/Procedures/Procedure-Columns Flow Chart
InstantSQL statements can be grouped into 5 functional
categories as follows:
Category |
Function |
connect and disconnect from a data source |
|
query a connected data source |
|
bind columns and parameters; |
|
acquire InstantSQL state information |
|
browse available data sources; and |
© Copyright 2000-2020 Micro Focus or one of its affiliates.