CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Location
    Miami, FL
    Posts
    67

    Assertion when opening an ADO connection from VC++

    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

  2. #2
    Join Date
    Apr 1999
    Posts
    10

    Re: Assertion when opening an ADO connection from VC++

    Hi there !

    Get your hands on Database programming with Visual C++ 6 in 21 days !

    They talk alot about ADO and how to use it ! Very usefull !


  3. #3
    Join Date
    May 1999
    Posts
    30

    Re: Assertion when opening an ADO connection from VC++

    Sounds like you are using a release version of a dll or exe with a debug virsion of your app.

    Long shot.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured