If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > What is the difference between OLEDB and ODBC.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-07-02, 18:04
cblalock cblalock is offline
Registered User
 
Join Date: Mar 2002
Posts: 12
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
Reply With Quote
  #2 (permalink)  
Old 11-08-02, 12:39
rnealejr rnealejr is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 11-08-02, 13:38
cblalock cblalock is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 11-08-02, 16:22
rnealejr rnealejr is offline
Registered User
 
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 ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On