Groups | Blog | Home
all groups > sql server programming > january 2004 >

sql server programming : odbc vs oledb


kevin
1/9/2004 10:59:04 PM
Hi Guys,
I am new to database world. I have a question.
what is the diff. between oDBC and OLEDB and which one I
should use and why?

Thanks a lot.
Dan Guzman
1/10/2004 7:38:58 AM
Both OLE DB and ODBC are 'native' SQL Server APIs. The main difference is
that OLE DB is COM-based but ODBC is not. There is a discussion on the pros
and cons of the various SQL Server APIs in the Books Online:

<Excerpt href="architec.chm::/8_ar_ad_3hih.htm">

Microsoft ActiveX® Data Objects (ADO) for most database applications. ADO
supports rapid development of robust applications and has access to most SQL
Server features. The SQL Server features needed by most applications are
supported by ADO when using the Microsoft OLE DB Provider for SQL Server.

</Excerpt>

Most applications nowadays interface with SQL Server using ADO (SQLOLEDB
provider) or ADO.NET. (SqlClient) APIs The .NET SqlClient is a native SQL
Server API.

--
Hope this helps.

Dan Guzman
SQL Server MVP

[quoted text, click to view]

Aaron Bertrand [MVP]
1/10/2004 10:31:10 AM
ODBC is an additional layer, and usually has a little extra overhead, making
data access a bit slower. ODBC is being deprecated, and Microsoft actually
recommends using OLEDB whenever possible. (This isn't feasible all of the
time, because some RDBMS platforms don't have a functional OLEDB driver.) A
little bit of info at http://www.aspfaq.com/2126

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




[quoted text, click to view]

AddThis Social Bookmark Button