Using DSN in connection string with SqlConnection Object

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use DSN in Connection string.
But for opening connection i am using 'SqlConnection' object.
i.e using System.Data.SqlClient;

So is it possible to use DSN in connection string with 'SqlConnection'
object. OR i should go only for 'OdbcConnection'.
 
¤ I want to use DSN in Connection string.
¤ But for opening connection i am using 'SqlConnection' object.
¤ i.e using System.Data.SqlClient;
¤
¤ So is it possible to use DSN in connection string with 'SqlConnection'
¤ object. OR i should go only for 'OdbcConnection'.

The native .NET SQL Server provider does not support the use of a DSN. You can use an application
config file (App or Web.config) to store your connection string.

If you need a DSN then you will have to use the .NET ODBC or OLEDB provider.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top