What is the difference between sqlClient and OleDb ?..

H

Hyo-Han Kim

Hi..


I am new to .NET

I know OLEDB . I am not new to OleDB, I guess..


but I see sqlClient womething..

What is the sqlClient ?..

What is the difference between sqlClient and OleDb ?..
??..

TIA ..
 
C

Cor Ligthert

Hi Kim,

Simple it is that SQLclient is dedicated to SQL server and it misses one
extra step so it is faster when it is used on SQL server than OleDb which is
for general database purpose.

I hope this gives an idea?

Cor
 
W

William Ryan eMVP

SqlClient can only be used with SqlServer. OleDbClient as well as
OdbcClient are libraries that can be used to access any oledb and odbc
compliant database respectively. I guess if you think of them in abstract
terms, OleDb is a more generic/abstract interface which means that it can be
used with SqlServer, Access, Oracle, Pervasive and even Excel. However, the
price you pay for this flexibility is reduced performance as Cor mentioned,
as well as limited functionality - after all Excel isn't going to be able to
handle stored procedures in the same way Sql Server can (or at all).

There's a ton of debate on this subject and many people advocate using the
most generic approach possible to make their app flexible. While there is
some merit to this, the other side would argue that you lose a lot by going
this route and how many times do you really need to switch out your back end
db. In the new 2.0 Framework there's a DBProvider factory object
http://www.knowdotnet.com/articles/miscadonet.html that can facilitate the
'generic' approach, but I think it's safe to say that wahtever your source
DB is, using the native provider is going to be the fastest and most
powerful approach. If you are interested in learnign a little more about
the 2.0 features, Pablo Castro has a web cast here
http://www.microsoft.com/downloads/...C1-512F-4D07-B04F-17DDE0FD318A&displaylang=en
that does a good job of explaining how to use it, along with some other
features, and it's probably the best webcast in terms of execution that I've
come across - all action no fluff.

HTH,

Bill

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top