473,382 Members | 1,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

SQLConnection vs. OLEDbConnection

Which is preferred or what is the difference? SQLConnection or
OLEDbConnection.

We are connecting to data in MSSQL2000 primarily through stored procedures.
Nov 21 '05 #1
4 9587
"Curtis" <cu****@synergyontheweb.com> schrieb:
Which is preferred or what is the difference? SQLConnection or
OLEDbConnection.


You will more likely get an answer here:

<URL:news://news.microsoft.com/microsoft.public.dotnet.framework.adonet>

Web interface:

<URL:http://msdn.microsoft.com/newsgroups....dotnet.framew
ork.adonet>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
The classes in the SqlClient Namespace have been specifically designed to
work with SQL Server 7 and up. There's a whole extra in those classes
(SqlConnection, SqlCommand, etc) specific to SQL Server which you won't find
in the classes under the OLEDb namespace (OLEDbConnection, OLEDbCommand,
etc). Also, various optmizations have been built into these classes keeping
SQL Server in mind which cannot be in the more generic OLEDb classes. You
should use the classes in the SqlClient namespace unless you have a good
reason not to. So I would suggest using SqlConnection for SQL Server 2000
and also using the remaining classes in the SqlClient namespace for data
access.
hope that helps..
Imran.

"Curtis" <cu****@synergyontheweb.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Which is preferred or what is the difference? SQLConnection or
OLEDbConnection.

We are connecting to data in MSSQL2000 primarily through stored
procedures.

Nov 21 '05 #3
hi.. I have recently just completed a project using entirely sqlxxx ado.net
command set ... however one customer has some Win98 system and sqlxxx
commands don't work .. have to take great pain to change all to OLEDBxxxx
...(not aware of any documentation mentioned about this....or i could have not
dig deep enough to find them..)
so my very own conclusion is SQLxxx is faster but OLEDBxxx is safer for
compatibility....

Albert

"Curtis" wrote:
Which is preferred or what is the difference? SQLConnection or
OLEDbConnection.

We are connecting to data in MSSQL2000 primarily through stored procedures.

Nov 21 '05 #4
Windows 98 is a supported platform for the classes in the SqlClient
namespace. Lookup the documentation for any of the classes and you should
see that. AFAIK, you need to make some changes with the Sql Server
configuration (or rather MSDE configuration since I don't think Sql Server
2000 runs on Windows 98) so as to get it to work correctly. Apart from that,
the classes should work fine.

hope that helps..
Imran.
"Albert" <Al****@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
hi.. I have recently just completed a project using entirely sqlxxx
ado.net
command set ... however one customer has some Win98 system and sqlxxx
commands don't work .. have to take great pain to change all to OLEDBxxxx
..(not aware of any documentation mentioned about this....or i could have
not
dig deep enough to find them..)
so my very own conclusion is SQLxxx is faster but OLEDBxxx is safer for
compatibility....

Albert

"Curtis" wrote:
Which is preferred or what is the difference? SQLConnection or
OLEDbConnection.

We are connecting to data in MSSQL2000 primarily through stored
procedures.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: cody | last post by:
What is the difference between OleDBConnection and SqlConnection? Or better expressed, what is OleDB? -- cody www.deutronium.de.vu || www.deutronium.tk
1
by: Tom Hartnett | last post by:
I just noticed that the SqlConnection class will not accept "file name=c:\SomeUDL.udl" as its connectionstring property. However, the OleDbConnection class will use it. Can anyone tell me why? ...
3
by: Stephen | last post by:
I'm experiencing a strange problem that has me baffled. I created a webservice with a webmethod that connects to a remote MS SQL Server. It works fine when connecting to one server (running SQL...
3
by: Ludvig | last post by:
This Exception is executed when using SQLConnection. OleDbConnection connects fine. System.EnterpriseServices.Platform.Initialize() +503...
3
by: Jon | last post by:
Hi, Can I use SQLconnection to connect to a Access DB File on my local drives? Thanks. Jon
2
by: neodev | last post by:
Hi I have 2 mode for open db 'Path DB Private Const pathDB As String = "C:\...\diabolik.mdb" 'for the ole db Private conn As New OleDbConnection 'for th sqlconnection Private connRS As...
5
by: Familjen Kalrsson | last post by:
Hi I wounder if I can use Sqlconnection or other Sql members to work with a MS Access database. I have tried to connect to Access's database Northwind, but when I set the data source to...
1
by: JO | last post by:
hello, is there a difference in speed between OLEDBConnection and SQLConnection bye, ################################################################## bonjour, existe t'il une différence...
2
by: DaveL | last post by:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=somedatabase;Data Source=mymachine i get the above connection string via a sql Table which relates to what...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.