Step 1. Initializing of the ODBC environment and connecting to a data source

 

This step includes all the initialization and connection processes an application must follow to create an active connection to a data source. Initializing of the ODBC environment and connecting to a data source takes place in six sub-steps:

 

  1. Allocate an environment handle.
  2. Declare the application ODBC version and set any other environment attributes.
  3. Allocate a connection handle and set any pre-connection attributes.
  4. Establish the connection.
  5. Set any post-connection attributes.