[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Connects to DSN fine as ConsoleApp, but not WebService

Rod Morison

12/30/2002 12:53:00 PM

I seem to have the same problem as Arno Pruder (Connecting to a DSN from
within a web service, 12/12/02), I can connect fine as a ConsoleApp, but not
as a WebService for which I get

ERROR [08001] [Sybase][ODBC Driver]Unable to connect to database server:
database engine not running ERROR [01000] [Microsoft][ODBC Driver Manager]
The driver doesn't support the version of ODBC behavior that the application
requested (see SQLSetEnvAttr).

Btw, I've granted Administrative privs to ASPNET and IUSR_RODNB, to clear
that issue. The DB is Sybase 5.5, the ODBC driver is SQL Anywhere 5.5,
Version 5.05.04.1867

It's a trivial code...

string myConnString = "NUC_NET"

string mySelectQuery = "SELECT * from _rt999";

Console.WriteLine(mySelectQuery);

OdbcConnection myConnection = new OdbcConnection(myConnString);

OdbcCommand myCommand = new OdbcCommand(mySelectQuery,myConnection);

myConnection.Open();

OdbcDataReader myReader = myCommand.ExecuteReader();