ODBC Driver for Microsoft Exchange

Build 22.0.8462

Connecting

To create a connection, create an environment handle and a connection handle using SQLAllocHandle. You can then use SQLDriverConnect to provide a DSN or an ODBC connection string.

Connect to a DSN


  SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); 
  SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); 
  SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc); 
  SQLDriverConnect(hdbc, 0, (SQLCHAR*)"Dsn=CData Exchange Source;", SQL_NTS, 0, 0, 0, 0);

Provide a Driver Connection String


  SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); 
  SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); 
  SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc); 
  SQLDriverConnect(hdbc, 0, (SQLCHAR*)"DRIVER={CData ODBC Driver for Microsoft Exchange};User='myUser@mydomain.onmicrosoft.com';Password='myPassword';Server='https://outlook.office365.com/EWS/Exchange.asmx';Platform='Exchange_Online';Schema='EWS';", SQL_NTS, 0, 0, 0, 0);

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462