Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

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))
        // Open the connection
        // 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())
    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=;API=ADO.NET;TIMEZONEADJUSTMENT=120
09:18:19 Attempting to connect using:
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
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

asked 22 May, 03:32

GoranV's gravatar image

accept rate: 0%

edited 22 May, 10:44

Volker%20Barth's gravatar image

Volker Barth

Can you capture the stack for the exception (or even just the message as the handler appears to be doing now). The client "log" is reporting a general error so that it not that helpful.

(22 May, 10:14) Chris Keating
Replies hidden

I get this error in exception: SQL Anywhere .NET Data Provider : Communication error (-85) Is there any other log file that I can check?

(22 May, 10:32) GoranV

I would suggest getting the full stack. Both the exception message or the client debug log are very generic. I would consider enabling server communication diagnsotics by adding -z -o <filespec>. These can also be set with sa_server_option procedure to set DebuggingInformation and ConsoleLogFile.

(22 May, 14:08) Chris Keating
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 May, 03:32

question was seen: 361 times

last updated: 22 May, 14:08