SqlConnection

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
 
R

rustylee

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
 
D

DaveL

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
 

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