I'm trying to open an ODBC data source using ADO from VC++ 6.0. Here's the code:

_COM_SMARTPTR_TYPEDEF(ADOConnection, IID_IADOConnection);

ADOConnectionPtr pConnection(CLSID_CADOConnection, NULL, CLSCTX_INPROC_SERVER);

HRESULT hr = pConnection->Open(_bstr_t("Provider=MSDASQL.1;Persist Security Info=False;User ID=alvaro;Data Source=OWLink"), _bstr_t(""), _bstr_t(""), 0);

Everything works fine up to the call to "Open" where I get a nasty Assertion box that says:

============================================
Debug Error!

File: i386\chkesp.c
Line: 42

The value of ESP was not properly saved accross a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
============================================

What's going on???

Also, where can I grab some good documentation on ADO programming using VC++?

Thanks in advance!

Alvaro