[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Accessing a sybase anywhere 5.0 server

Nathan Going

7/5/2002 2:05:00 PM

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



1 Answer

Fernando Salas

9/4/2002 4:56:00 AM

0

Hi Nathan

I had a similar problem, for what I saw it is a problem with dbclient
and ASP .NET, dbclient will refuse to get up when you open a connection from
ASP .NET if it is already up from other place(like sccentral), also if u
don't configure the options part in the dsn and leave the default (dbeng50)
it won't work either, I have a Sybase Anywhere 5.5 up and running with ASP
.NET. Try the following:

1.-First start up a server using the server manager or manually using
dbsrv50.exe
2.-Make the odbc DSN for ASP .NET (be carefull in the server name as it is
case sensitive), don't forget to press the options button, and in there
specify to use dbclient, use this DSN with ASP .NET ONLY
3.-Make a second ODBC, but in this case leave options at it came by default
(dbeng50), use this DSN with all EXCEPT ASP .NET

This do the trick in my case with 5.5, which is pretty the same thing

I hope this helps, and feel free to contact me if u need more assistance

Fernando
Another one suffering Sybase lol




"Nathan Going" <nathangoing@yahoo.com> wrote in message
news:fYfV8.153394$0g1.2809829@twister.tampabay.rr.com...
> 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
>
>
>