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

SQL Anywhere connection issue - Communication function SQLPresSyncPoint code 2

0 Kudos
872

Hi, I am trying to connect to the database using SQL Anywhere 17 and Sap.Data.SQLAnywhere.Core.v2.1. I have created one test app:

using (SAConnection connection = new SAConnection(this.connString.Text))
{
    try
    {
        // Open the connection
        connection.Open();
        // Create a command
        using (SACommand command = new SACommand("SELECT * FROM F1.FK_Artikel", connection))
        {
            // Execute the command and retrieve data
            using (SADataReader reader = command.ExecuteReader())
            {
                // Read data
                while (reader.Read())
                {
                    log(reader["ColumnName"].ToString());
                }
            }
        }
    }
    catch (SAException ex)
    {
        // Handle exceptions
        log("Error: " + ex.Message);
    }
}
but I got error in log:
09:18:19 Application information:
09:18:19 HOST=MyServer;OSUSER=admin;OS='Windows 8 Build 9200 ';EXE=C:\\Users\\admin\\Desktop\\Testing\\x86-1\\Debug\\net6.0-windows\\Test2.exe;PID=0x4038;THREAD=0x3dfc;VERSION=17.0.11.7058;API=ADO.NET;TIMEZONEADJUSTMENT=120
09:18:19 Attempting to connect using:
UID=User1;PWD=**;DBN=Db2;DBF=\\192.168.100.192\\db\\mydb.db;ServerName=mysrv;LOG=MyLogFile.txt;PROWS=200;CPOOL=NO
09:18:19 Attempting to connect to a running server...
09:18:19 Trying to start SharedMemory link ...
09:18:19     SharedMemory link started successfully
09:18:19 Attempting SharedMemory connection (no sasrv.ini cached address)
09:18:19 Connected to server over SharedMemory
09:18:19 Connected to SQL Anywhere Server version 17.0.11.6933
09:18:19 Connected to the server, attempting to connect to a running database...
09:18:19 [  395] Connected to database successfully
09:18:19 [  395] Communication function SQLPresSyncPoint code 2
09:18:19 [  395] Communication function i_cs_HandleSQLPresError code 2

Accepted Solutions (0)

Answers (0)