Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLEDB & ODBC 1

Status
Not open for further replies.

gk4u

Programmer
Jul 2, 2002
21
IN
Hi All
I want differencr between OLEDB and ODBC connection to the database. which is best.


Regards
GK
 

If you use ADO, then OLEDB is generally better than using ODBC, if an OLEDB database manager driver is available for the provider in question. [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
OLEDB is the preferred method and should be faster because you're using one less layer to access the database.
 
OLEDB can not be used directly from within VB because of VB does not support all the datatypes used by OLEDB. If you want to use OLEDB, you've got to go through ADO (which is actually a wrapper around the OLEDB interfaces).
Greetings,
Rick
 

>OLEDB can not be used directly from within VB...

??

Hmmm... [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Yes, it's sad but true. Some of the interfaces used by OLEDB use variable types not supported by VB.....
Greetings,
Rick
 


I was thinking more on the line of creating your own OLEDB.

I guess you are talking about an existing OLEDB provider. [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
True, you're not directly communicating with OLEDB, but you can use ADO to communicate with the OLEDB provider, which in turns talks to the database. ADO is an API wrapper around OLEDB. It's still faster than ODBC, because you have to access an extra layer.
 
Well, actually ADO's not an API layer around the OLEDB interfaces. Actually is a COM layer around it.....

And no CCLINT, I'm not talking about an existing OLEDB provider, what I'm talking about was communicating directly with the OLEDB interfaces. This is not possible from within VB, which is sad on one hand (because of omission of another layer) but on the other hand, ADO makes it much more easier and programmer friendly to go through OLEDB to data storage.

But Omega is absolutely right; ADO is still faster to access databases than it is to do it with ODBC. And besides, almost every COM interface expects ADO recordsets and such, so if you were to write logic that may be implemented elsewhere, you're quite safe using ADO.
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top