ConnectionString using DSN not working



I have been using SqlConnection .NET strings in my web,config and my
application is working finr. However due to requirements, I am forced
to change the connection string to use DSN and I cannot connect to the
data. Can anyone point out what is wrong with my settings.

Here is the SqlConnection in my web.config

<add name="LocalSqlServer" connectionString="server=EFFENDI
\SQLEXPRESS;uid=CoopAdmin;pwd=pass;database=coopgown"
providerName="System.Data.SqlClient" />


And here is the one using DSN

<add name="LocalSqlServer"
connectionString="Dsn=DBADGRAD;uid=CoopAdmin;pwd=pass"
providerName="System.Data.Odbc" />

When I try to open the Asp.net application Configuration pages, I get
the following error mesages

An error occurred while attempting to initialize a
System.Data.SqlClient.SqlConnection object. The value that was
provided for the connection string may be wrong, or it may contain an
invalid syntax. Parameter name: connectionString

Any ideas?

Thanks in advance.

.



Relevant Pages

  • Re: Connection string information
    ... I just decompiled the SQLConnection class. ... > private string _password; ... If an element exists within the connection string it parses it, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Close not closing...
    ... string connectionString; ... // create a new SqlConnection object with the appropriate ... connection string SqlConnection sqlConn = new ... If I hit the script button first, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection string information
    ... I just decompiled the SQLConnection class. ... private string _password; ... inherited from DBConnectionString but my decompiler was not good enough to ... If an element exists within the connection string it parses it, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Data Reader Error Please Help its Urgent
    ... SqlConnection sqlConn = new SqlConnection ... Also, when I test for connection state, I test with if (conn.ConnectionState ... > Those Functions returns String, ... > But NO WHERE I AM USING DATAREADER IN WHOLE PROJECT. ...
    (microsoft.public.dotnet.framework.adonet)
  • HOW TO HIDE A CONNECTION STRING
    ... I have an executable project that uses a SqlConnection. ... I'm trying to hide a connection string in the code of the Class Library ...
    (microsoft.public.dotnet.security)