The HCL OneDB ODBC Driver API
An application uses the HCL® OneDB® ODBC Driver API to make a connection to a data source, send SQL statements to a data source, process result data dynamically, and terminate a connection.
The driver enables your application to perform the following steps:
- Connect to the data source.
You can connect to the data source through a DSN connection, or you can use DSN-less connection strings. Specify the data-source name and any additional information needed to complete the connection.
- Process one or more SQL statements:
- Place the SQL text string in a buffer. If the statement includes parameter markers, set the parameter values.
- If the statement returns a result set, either assign a cursor name for the statement or let the driver assign one.
- Either prepare the statement or submit it for immediate execution.
- If the statement creates a result set, you can inquire about the attributes of the result set, such as the number of columns and the name and type of a specific column. For each column in the result set, assign storage and fetch the results.
- If the statement causes an error, retrieve error information from the driver and take the appropriate action.
- End any transaction by committing it or rolling it back.
- Terminate the connection when the application finishes interacting with the data source.
Every HCL OneDB ODBC Driver function name starts with the prefix SQL. Each function accepts one or more arguments. Arguments are defined as input (to the driver) or output (from the driver).
The following figure shows the basic function calls that an application makes even though an
application generally calls other functions also.