Full Connect (Conn/Connect Menu)

The Full Connect function tool completely connects to a data source. This tool performs the following actions:

  1. If the ODBC Menu Version is set to ODBC 3.0 or Both, it calls SQLAllocHandle with a HandleType of SQL_HANDLE_ENV (if necessary). If the ODBC Menu Version is set to ODBC 2.x, it calls SQLAllocEnv (if necessary). If an environment has already been allocated, Full Connect allocates a new environment if the New henv box has been selected in the Full Connect dialog box. Both environment handles are listed in the environment handle list boxes on the toolbar; selecting a different environment in the list box switches the displayed windows from one environment to the other.

  2. It calls SQLSetEnvAttr to set the SQL_ATTR_ODBC_VERSION environment attribute to SQL_OV_ODBC3 if the ODBC 3.0 box is selected in the ODBC Behavior control of the Full Connect dialog box, or to SQL_OV_ODBC2 if the ODBC 2.x box is selected. If Default is selected, SQLSetEnvAttr is not called.

  3. If the ODBC Menu Version is set to ODBC 3.0 or Both, it calls SQLAllocHandle with a HandleType of SQL_HANDLE_DBC. If the ODBC Menu Version is set to ODBC 2.x, it calls SQLAllocConnect.

  4. It calls SQLSetConnectAttr (ODBC 3.0 or Both) or SQLSetConnectOption (ODBC 2.x) with the SQL_ODBC_CURSORS attribute (or SQL_ODBC_CURSORS option) and the value SQL_CUR_USE_IF_NEEDED (if the Use If Needed box is selected in the Cursor Library control of the Full Connect dialog box), SQL_CUR_USE_ODBC (if Use ODBC is selected), or SQL_CUR_USE_DRIVER (if Use Driver is selected). If Default is selected, SQLSetConnectAttr or SQLSetConnectOption are not called.

  5. It calls SQLDriverConnect with the InConnectionString argument set to a null pointer and the DriverCompletion argument set to SQL_DRIVER_COMPLETE. If SQLDriverConnect is not supported, it invokes SQLConnect with the given connection information.

  6. If the ODBC Menu Version is set to ODBC 3.0 or Both, it calls SQLAllocHandle with a HandleType of SQL_HANDLE_STMT. If the ODBC Menu Version is set to ODBC 2.x, it calls SQLAllocStmt.