Saturday, February 25, 2012

connection string with dsn

I want's to use following connection string

"dsn=MyDsn;uid=MyUser;pwd=MyPassword"

Can some how I use it with sqlconnection

I want's to get rid of odbconnection e.t.c

What will be the connection string for sql provider for above dsn information.

If anybody can explain the please help me ?

If you use a DSN, you will have to use ODBC to connect. Here are your options for connecting to SQL Server:http://www.connectionstrings.com/?carrier=sqlserver|||

Take a look here:http://www.connectionstrings.com

Hope this helps!

|||

Thanks mike then I have to use odbc.

By using dsn.I can hide the server name but for dsnless i have to provide the server name which i don't want's to provide.

|||

I put my connection string in webconfig. There is an option to encrypt this if you want. I haven't done it so I don't know what's involved. But I am sure a google search for "Encrypt connection string web config" will yield some useful info.

All I know is that one should steer clear of ODBC unless you can avoid it. It adds an extra layer of software to your data access which hampers scalability.

No comments:

Post a Comment