No you do not need a DSN. If you store your connection string info in your
web.config then you will need to later read it back out and use it.
<appSettings>
<add key="ConnectionString"
value="server=servername;Trusted_Connection=true;d atabase=dbname;Application
Name=myappname"/>
</appSettings>
Dim cn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("C onnectionString"))
With the above connection string, you would connect to SQL as the ASPNET
user. That user will need right to the database. Or you could supply a SQL
username and password as you were doing. If you also supply an Application
Name it is easier to debug using SQL Profiler. (Just ignore that if that
doesn't make sense to you).
HTH,
Greg
"Hugh G. Johnson" <hu*************@comcast.net> wrote in message
news:S_********************@comcast.com...
OK. I'm totally a Newb, so cut me some slack.
Here it goes... With all these high falutin features of asp.net do I still
need a dsn for the SQL database/server? Or is this enough to turn the
lights
on?
<appSettings>
<add key="DBProvider" value="MSSQL" />
<add key="DBConn" value="data source=server;initial catalog=database;user
id=uid;password=pwd;persist security info=True;packet size=4096" />
</appSettings>
Thanks!
Hugh