Sybase SQL Anywhere5.0 and .net
connections to a ODBC database server. I have SQL Anywhere 5.0 running and
get the following error when attempting a connection.
ERROR [08001] [Sybase][ODBC Driver]Unable to connect to database server:
specified database not found ERROR [01000] [Microsoft][ODBC Driver Manager]
The driver doesn't support the version of ODBC behavior that the application
requested (see SQLSetEnvAttr).
Here is the code i used.
string strConnection="DSN=USData";
string strSelect="SELECT bl_id FROM bl ORDER BY bl_id ASC";
OdbcConnection odbcConnection=new OdbcConnection(strConnection);
OdbcCommand odbcCommand=new OdbcCommand(strSelect,odbcConnection);
odbcConnection.Open();
OdbcDataReader odbcReader=odbcCommand.ExecuteReader();
while (odbcReader.Read())
{
ListBox1.Items.Add(odbcReader.GetString(0));
}
odbcReader.Close();
odbcConnection.Close();
I can access the database server through sybase central with no problem.
Visual Studio .Net Server explorer has no problem connecting to the server
either. If anybody has any suggestions, i would greatly appreciate it.
Thanks,
Nathan Going

