Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2002
    Posts
    12

    Unanswered: What is the difference between OLEDB and ODBC.

    I was creating a asp page that contained a recordset that was opened by calling a stored procedure from Sql Server 2000. At the time I was using an oledb connection and would receive the error:

    ADODB.Recordset (0x800A0CC1)
    Item cannot be found in the collection corresponding to the requested name or ordinal.

    I then changed the connection string to ODBC and now the ASP runs fine. So besides what I just mention what are the difference that I need to be aware about? Which is better to use? Was I not calling the stored procedure properly using the OLEDB? I am confused.

    Thanks in Advance.

    BTW: This is my stored procedure call.

    rsAnsVis.Open "sp_AnsVisCount",objConn,,,adCmdStoredProc

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    OLEDB is always faster than ODBC - basically, the levels of communication between your app and the database is smaller with oledb than odbc. Did you have an parameters for the sp (input or output ) ? Did you use the same code for both the oledb attempt and the odbc success ? Which database are you using (include version /sp) ? Which version of mdac are you using ? I ask these questions because this might be a service pack /version issue.

  3. #3
    Join Date
    Mar 2002
    Posts
    12
    No I did not have any input or output parameters for the stored procedure.

    Yes I used the exact same code to open the record set.

    I am using SQL Server 2000; I don't know the service pack.

    I am using Mdac 2.6

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    Are you using a client-side or server-side cursor ? Can you duplicate the same problem with northwind or pubs and post your code and stored procedure ?

Posting Permissions

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