An ODBC application needs to follow a basic set of steps in order
to access a database server.
- Connect to the data source.
- Place the SQL statement
string to be executed in a buffer. This is a text string.
- Submit the statement in order that it can be prepared or immediately
run.
- Retrieve and process the results.
- If there are errors, retrieve the error information from the driver.
- End each transaction with a commit or rollback operation (if necessary).
- Terminate the connection.