Wednesday, March 7, 2012

exception in in connection with SQL server

Hi all,
I am using OdbcConnection for coonectivity with SQL Server db. My code
is working fine with windows application but in ASP.NET or in
webservice its raising following exception -
"ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL
Server does not exist or access denied.
ERROR [01000] [Microsoft][ODBC SQL Server Driver]
[DBNETLIB]ConnectionOpen (Connect())."
at System.Data.Odbc.OdbcConnection.Open()
Same code is working fine for Orace DSN.
My code:
OdbcConnection conn = new
OdbcConnection("dsn=MyDsn;uid=sa;pwd=stars;");
conn.Open();
Please help me to sort out this problem
Thanks
Dharmendra
Check the SQL Server log for login failures. How is your web
app authenticating? How is IIS configured? What are you
using in your config files for the application?
You need to see what login is failing depending on how you
have things configured.
-Sue
On 14 May 2007 23:03:36 -0700, tomar
<dharmendratomar2000@.gmail.com> wrote:

>Hi all,
>I am using OdbcConnection for coonectivity with SQL Server db. My code
>is working fine with windows application but in ASP.NET or in
>webservice its raising following exception -
> "ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL
>Server does not exist or access denied.
>ERROR [01000] [Microsoft][ODBC SQL Server Driver]
>[DBNETLIB]ConnectionOpen (Connect())."
> at System.Data.Odbc.OdbcConnection.Open()
>Same code is working fine for Orace DSN.
>My code:
>OdbcConnection conn = new
>OdbcConnection("dsn=MyDsn;uid=sa;pwd=stars;");
>conn.Open();
>
>Please help me to sort out this problem
>Thanks
>Dharmendra

No comments:

Post a Comment