SqlConnection

  • Thread starter Thread starter DaveL
  • Start date Start date
D

DaveL

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
customer database to connect to or database and or another service
my problem is this is a OLEDB Connection String

When i use net to connect with this string i get Provider keyword not
supported

Whats the best fix for this, i can't change the table, other old vb programs
use it

Thanks
DaveL
 
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
customer database to connect to or database and or another service
my problem is this is a OLEDB Connection String

When i use net to connect with this string i get Provider keyword not
supported

Whats the best fix for this, i can't change the table, other old vb programs
use it

Thanks
DaveL

Hi Dave,

The SqlConnection object expects a SqlConnection connection string.
The one you've posted here is an OleDbConnection connection string.

Here is a great resource for connection strings:

http://www.connectionstrings.com/?carrier=sqlserver

Scroll down and you will find the SqlConnection (ADO.NET) connection
string.

-Rusty
 
Thanks Rusty
I wrote a Conversion from Older Connection strings
to adonet connection strings,
I will use the Other Connection Objects when i absolutly need to

Thanks Dave
I'll Read the link Thanks


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
customer database to connect to or database and or another service
my problem is this is a OLEDB Connection String

When i use net to connect with this string i get Provider keyword not
supported

Whats the best fix for this, i can't change the table, other old vb
programs
use it

Thanks
DaveL

Hi Dave,

The SqlConnection object expects a SqlConnection connection string.
The one you've posted here is an OleDbConnection connection string.

Here is a great resource for connection strings:

http://www.connectionstrings.com/?carrier=sqlserver

Scroll down and you will find the SqlConnection (ADO.NET) connection
string.

-Rusty
 
Back
Top