Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2002
    Posts
    19

    Post Unanswered: trouble with ADO 2.1

    I am having some massive problem with ADO 2.1 going over to a MS SQL database. I have already set up the DSN and have called it chicagowebs. The call to DAO_WorkspaceOpenConnection() keeps failing. The error says "invalid parameter". Can anyone tell me what it can be or how to solve this? I have never worked with ADO before.


    //for the SQL database
    iRc = DAO_NewDBEngineDBEngine (NULL, 1, LOCALE_NEUTRAL, 0, &CAOHEngine);

    iRc = DAO_DBEngineCreateWorkspace (CAOHEngine, NULL, "WORKSP1", "userid", "password", CA_VariantInt (DAOConst_dbUseODBC), &DAOOWorkspace);

    iRc = CA_CStringToBSTR ("chicagowebs", &bstrConn);

    iRc = DAO_WorkspaceOpenConnection (CAOHEngine, &error, "WORKSP1", CA_VariantInt(DAOConst_dbDriverPrompt),
    CA_VariantBool (0), CA_VariantBSTR (bstrConn),&DAOOConnection);
    Telemarketing right from your PC.
    www.dialeronline.net

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Can you provide the code behind the functions ?

  3. #3
    Join Date
    Nov 2002
    Posts
    19
    No I can't because these are actually ADO functions, not mine!
    Telemarketing right from your PC.
    www.dialeronline.net

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    What language are you coding in ? These are not ado object methods. DAO normally references an access database. And the fact that the functions you are using reference a db workspace makes me even more concerned that these were created for access developers who needed to use ado. How are you able to reference these functions in your code ?

  5. #5
    Join Date
    Nov 2002
    Posts
    19
    Yes. In fact the first few function calls work fine. I have found in the desctiption of the error 800a0bb9 - arguments are the wrong type are out of range, or in conflict with one another. But which parameter?
    Telemarketing right from your PC.
    www.dialeronline.net

  6. #6
    Join Date
    Feb 2002
    Posts
    2,232
    These functions were created by someone in your company or they are from a 3rd party vendor - these are not part of ado - they have been customized (it appears for access developers). So you must find some documentation as to how these functions were created and what parameters they expect - that is why I asked how are you able to reference/call these functions in your code. I can show you how to code using ado but I need to know what language you are using.

Posting Permissions

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