views:

69

answers:

2

I am a newbie with Subsonic. I want to create a SQL connection using DSN; then I want to generate the DAL using Subsonic. Please can you give me some pointers on what to do?

A: 

You don't need a DSN in these days (I assume you want to abstract the connection) - you can do that with SubSonic 3 by specifying the provider right in the connection string. If you want to switch providers, just change the "providerName" attribute of the connectionString.

I'm wondering if this is for legacy issues but a DSN is entirely in your control, it seems - and I think there's a better way.

Rob Conery
A: 

Hi Rob,

When i have a connection string e.x

SqlConnection con=new SqlConnection("dsn=test;uid=abc;pwd=abc");

in my web.config file i have already done the connection string part. But in SubSonicService where i mention which connection i want to use it says invalid key "dsn" in connectionstring. I want to use the same in my website where the server only allows "DSN" to connect with the sql server.

Please Help Thanks

Ritesh