Re: OLEDBCommand vs. SQLCommand
- From: "Anil Gupte" <anil-list@xxxxxxxxxxx>
- Date: Wed, 6 Dec 2006 23:21:59 +0530
Thanx Seth & Pamela, that does help. I also realized that MS Acesss is not
just a scaled down SQL server, but accorind to my book it has a different
(JET) database engine. It is just an assumption that I made, thinking
Access is SQL Server lite.
--
Anil Gupte
www.keeninc.net
www.icinema.com
"rowe_newsgroups" <rowe_email@xxxxxxxxx> wrote in message
news:1165414658.905575.17400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Personally, I almost always use the OleDb classes. This is mainly
because when I wrote my "superclass" I wrote it to be compatible with
all the servers my company uses, meaning either OleDb or ODBC (and I
hate ODBC). If all we had were SQL Server databases I might change my
story but until then I'll stick with Oledb. I did a few searches for
the differences and one post from Bill Vaughn said the the OleDb class
realies on COM interop while the SQLClient is a truely native to SQL
Server versions 7 and up.
Hopefully someone will post a link to the differences between the two.
Thanks,
Seth Rowe
pamelafluente@xxxxxxxxx wrote:
rowe_newsgroups ha scritto:
I might be wrong here, but someone will surely correct me if I am:
As far as SQL statements go, all three commands use them to talk to the
database, the prefix before "Command" or "Connection" is an indicator
of what it can access, not how. With that said, the OleDbCommand's are
for communicating with any OLEDB providing databases, like Oracle,
Access, SQL Server, Excel, etc. However the SQLCommand is created
especially for Microsoft's SQL Server databases, providing some SQL
server specific features and better performance.
I have been always wondering about that. I have been using the OLEDB
against SQL server and it is fast. Is there any reason why , for
instance,
a query sent by the SQLCommand should be faster than the same query
sent via an OLEDBcommand ? And id the sql reader faster than the OLEdb
reader ?
I do not have this feeling. Has anyone some test about that?
I think that using OLEDB may give the advantage that if you change
the underlying DB you do not have to change the code. And this seems to
be a huge
reason to use it whenever possible.
Also the possibility to access the GUIDs is fundamental. And this is
another huge reason.
Actually I am not clear why the need sort of specialized connectors. If
there is a form of a specialization a generic connector should be smart
enough to use specialized function when connected to specific DBMS.
What not make all the oledb way? What do you guys think ??
Finally ODBC is used
for ODBC complaint databases (almost all databases are). However, ODBC
requires that you set up a DSN (data source name) before using it - or
at least it used to - and is less efficient than using OleDbCommands or
SQLCommands, but may be your only choice depending on the database.
Does that help?
Thanks,
Seth Rowe
Anil Gupte wrote:
When does one use one or the other? And why? I cannot imagine too
many
innstances where you would not want to use SQL statements when you
communicating with a database - even on a read-only basis. Plus
there is
the ODBCCommand class too - I understand that is an older
implementation and
is not used in .Net much, correct?
Thanx for any clarifications and perhaps web links to discussion on
this.
--
Anil Gupte
www.keeninc.net
www.icinema.com
.
- References:
- OLEDBCommand vs. SQLCommand
- From: Anil Gupte
- Re: OLEDBCommand vs. SQLCommand
- From: rowe_newsgroups
- Re: OLEDBCommand vs. SQLCommand
- From: pamelafluente
- Re: OLEDBCommand vs. SQLCommand
- From: rowe_newsgroups
- OLEDBCommand vs. SQLCommand
- Prev by Date: Usercontrol does not loose focus, well not when I think it should....
- Next by Date: Boostraper para SQL Express 2005
- Previous by thread: Re: OLEDBCommand vs. SQLCommand
- Next by thread: Re: OLEDBCommand vs. SQLCommand
- Index(es):
Relevant Pages
|
Loading