Ingres® 2006 - OpenAPI User Guide |
|||
|
ISBN : - |
Order a printed copy of this book from Amazon --UNAVAILABLE-- |
||
![]() Cover Design - Ingres® 2006 - OpenAPI User Guide |
For your free electronic copy of this book please verify the numbers below. (We need to do this to make sure you're a person and not a malicious script) | ||
|
Sample Chapter From Ingres® 2006 - OpenAPI User Guide Copyright © Ingres Corporation |
|||
Chapter 1: IntroductionThis guide provides programmers with the information necessary to use Ingres® OpenAPI® to develop applications. What Is OpenAPI?Open Application Programming Interface (OpenAPI) is a set of C language functions that enable you to create applications for accessing Ingres and non-Ingres databases. It provides you with an alternative to using embedded SQL, which requires a preprocessor in addition to a C compiler. With OpenAPI, these C functions are called directly with normal function call facilities.OpenAPI simplifies the task of developing applications when multiple interfaces, protocols, and environments are involved. It does this by providing a single interface for accessing data. You can concentrate on what data you want your application to access, rather than how it will access it. OpenAPI provides an asynchronous method of writing applications. All OpenAPI operations are asynchronous in that a function call returns control to the application before its tasks are completed. When the tasks are completed, the function signals completion by invoking a callback function specified by the application. Thus, you can write an application as fully asynchronous, eventdriven code. Alternatively, you can write synchronous code by using an OpenAPI feature that enables an application to wait for each OpenAPI function to complete its tasks. Application Programming InterfacesOpenAPI is an application programming interface, similar to Microsoft Windows ODBC and the X/Open Company SQL Call Level Interface. Application programming interfaces have the following features in common:A standard set of function calls for accessing a database This makes an application p rogramming interface ideally suited for a client/server environment, in which the target database may not be known when the application is built. No requirements for host variables or other embedded SQL concepts Application developers who are familiar with function calls find an application programming interface straightforward to use. Preprocessor independence SQL statements are sent to a DBMS Server as input parameters in a function call. Query results are returned to the application as output parameters from the function call. OpenAPI ConceptsThis section introduces the concepts that you should be familiar with before using OpenAPI. It also discusses how OpenAPI functions are used to establish connections and perform server operations.Parameter BlocksThe parameter block is a C structure that is used for passing information back and forth between an application and OpenAPI. All OpenAPI functions require a parameter block. The application creates the parameter block and passes it as an argument to the OpenAPI function.Each parameter block contains input and output parameters. Input parameters contain information sent by the application and needed by OpenAPI to carry out the request. Output parameters are returned from OpenAPI to the application and contain the results needed by the application for status reporting or for making subsequent function calls. Output parameters can be immediate output or delayed output. Immediate output parameters contain meaningful values as soon as the OpenAPI function returns. Delayed output parameters do not contain meaningful values until all tasks associated with the OpenAPI function are completed.
|
|||