cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ERROR 08001 [Sybase][ODBC Driver][SQL Anywhere] - Database Server Not Found

Former Member
0 Kudos
7,687

We have an application built in C# connecting to a Sybase 6.0.0.4789 and sql anywhere 11.1.2596 For sometime the application runs fine reading the text files and creates/updates/insert data into the tables without any problem. After sometime the application throws an error .The exception I get is ERROR [08001][Sybase][ODBC Driver][SQL Anywhere]Database server not found.

The connection string I'm using is if (sqlString != string.Empty) { oDBHelper.ExecuteNonQuery(CommandType.Text, sqlString); sb = new StringBuilder(); sqlString = string.Empty; }

execute non query to open and insert data

public int ExecuteNonQuery(CommandType cmdType, string cmdText) { try {

        EstablishFactoryConnection();
        PrepareCommand(false, cmdType, cmdText);
        int val = oCommand.ExecuteNonQuery();
        return val;
}

Below is the connection to open database.

public void EstablishFactoryConnection() { if (0 == DbProviderFactories.GetFactoryClasses().Select("InvariantName='" + S_PROVIDER + "'").Length) throw new Exception("Invalid Provider"); / oConnection = oFactory.CreateConnection();

    if (oConnection.State == ConnectionState.Closed)
    {
        if (utils != null)
        {
           oConnection.ConnectionString = utils.DBMgr.ConnectionStr;
           oConnection.Open();
           oConnectionState = ConnectionState.Open;
        }
    }
}

But when tested on another server which has sybase 6.0.0.4787 and sql anywhere 11.0.1 the application works perfectly alright without any issues. Creates all the tables and inserts the data through the application . Is this anyway related to the version's of the sybase and sql anywhere . NOt sure whats happening. Any ideas? and Please help me in this regard am really helpless at this point of time.

Thanks in advance

Accepted Solutions (0)

Answers (0)