Sql Server Oledb Driver Instant

// Create Data Source object IDBInitialize* pIDBInitialize = NULL; CoCreateInstance(CLSID_MSOLEDBSQL19, NULL, CLSCTX_INPROC_SERVER, IID_IDBInitialize, (void**)&pIDBInitialize);

Provider=MSOLEDBSQL19;Server=myServerName;Database=myDatabaseName;Uid=myUsername;Pwd=myPassword; sql server oledb driver

For new OLE DB development on Windows, always use MSOLEDBSQL 19 . Avoid SQLNCLI and SQLOLEDB . If you are building new applications and do not require COM specifically, consider using ODBC or modern .NET data providers instead. // Create Data Source object IDBInitialize* pIDBInitialize =

// Set connection properties (DBPROPSET_DBINIT) // ... (see MSDN for full property setup) sql server oledb driver