Nicholas Paldino [.NET MVP]
8/30/2002 4:50:00 PM
Nathan,
By default ASP runs under the ASPNET account, which is a local account
with no network permissions. You have to change the default user that the
page runs under (by changing web.config) to one that has permissions to view
the network.
Also, the error you get is not related to permissions. Basically,
whatever driver you have for Sybase that you are using doesn't play well
with the version of ODBC that you have. You might want to contact Sybase
for more information on this one, or maybe use an OLE-DB provider, if you
can.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- nicholas.paldino@exisconsulting.com
"Nathan Going" <nathangoing@yahoo.com> wrote in message
news:JuAb9.19375$Rx4.281180@twister.tampabay.rr.com...
> I have previously posted this message a few months ago. The response I got
> was to do something with the security permissions. I think there was also
> something done with the .net console, but I cant remember. The odd thing
is
> that I have no problems creating a connection to the database through the
> server explorer in visual studio.net, but when it comes down to creating a
> connection in code, I fails. Please, if anybody has any clue what is going
> on, I would seriously appreciate any help. BTW, the error was generated
> from an ASP.NET application.
>
> Below is my original post.
>
> I am trying to write I web-user interface that can make queries against a
> Sybase Anywhere 5.0 Database. On the test setup, the Database server will
> and IIS will be running on the same machine. My problem lies when I try to
> make I connection to the database.
>
> string strConnection="DSN=USData";
>
> string strSelect="SELECT * FROM bl";
>
> OdbcConnection odbcConnection=new OdbcConnection(strConnection);
>
> OdbcCommand odbcCommand=new OdbcCommand(strSelect,odbcConnection);
>
> OdbcDataAdapter odbcDataAdapter=new OdbcDataAdapter(odbcCommand);
>
>
>
> odbcConnection.Open();
>
>
>
>
>
> I get this error:
>
> ERROR [08001] [Sybase][ODBC Driver]Unable to connect to database server:
> unable to start database engine ERROR [01000] [Microsoft][ODBC Driver
> Manager] The driver doesn't support the version of ODBC behavior that the
> application requested (see SQLSetEnvAttr).
>
> But from the server I can start Sybase central with no problem using the
> same settings as in the system-dsn USData.
>
> Thanks much for any insight you might have,
>
> Nathan Going
>
>
>
>
>
>
>