Hello, I tried to access sybase via MSADO 2.8 and SQL Anywhere17 Driver, but was not successful. Obviously it sets up a connection (there is no error message) but it does not except the SELECT etc. It says: the syntax is wrong. Even if the syntax is the same as in MS Query / Excel. There it works via SQL Anywhere 17 ODBC and I can edit the values in the fields of Sybase DB. Does anybody have an advise? I would be very thankful. Johannes

asked 05 Oct, 04:53

innolinea's gravatar image

accept rate: 0%


Can you start the DB server using the key "-zr" and check what SQL query comes from MSADO? Maybe it comes with "square brackets":

dbsrv17 -zr sql test.db

(05 Oct, 07:55) Vlad
Replies hidden
Comment Text Removed

Hello Vlad, I was able to start test.db from command line (cmd). Now it works. But how do I check SQL Query which comes from MS ADO? Johannes

(05 Oct, 09:46) innolinea

In your command line, start dbsrv17 with these extra options

-zr sql -zo "c:\temp\logsql.txt"

(05 Oct, 10:05) Breck Carter

You can also turn -zr on and off dynamically, after the server has started; see the Help Topic Request Logging to learn about CALL sa_server_option().

. . . request logging is a wonderful tool for desperate times :)

(05 Oct, 10:09) Breck Carter

after cmd command: >dbsrv17 -zr sql -zo "c:\temp\logsql.txt" test1.db - the logsql.txt is empty. Any suggestions? Thank you

(05 Oct, 10:36) innolinea

Is it still empty when you try to access the database via MS Query and/or your application? Because the log will only list database requests so just starting the database via dbsrv17 does not lead to any database request.

(05 Oct, 11:24) Volker Barth

In addition to Volker's question, you can log everything (not just sql) this way:

dbsrv17 -zr all -zo "c:\temp\logsql.txt" test1.db
(05 Oct, 13:48) Breck Carter

Thank you, Volker, so far, when I start the database via dbsrv17... I am not anymore able to use an DataSource connector in order to connect Excel/MSQuery. But if I try to connect via VBA connection string (sConnStr = "DRIVER=SQL Anywhere 17;Database=C:\Users......\test1.db;UID=test1User;PWD=testpwd" ) - the log file contains entries. It says, that the correlation name (of the target table) is missing. I do not have extended knowledge in this field, this is the point, I think. Generally I am looking for a proper way to communicate with Sybase via VBA, as it works (very god!) with MSSQL and SQLite. Thanks very much to everybody for your precious help so far. Now I have to prepare myself for a business trip. I will try to continue afterwards. Johannes

(06 Oct, 04:35) innolinea

thank you, Breck, very much

(06 Oct, 04:36) innolinea

thank you, Vlad, very much so far

(06 Oct, 04:40) innolinea

Please start a new question. Include ALL the copy/pasted text of your code for connecting, AND the log file.

You can format the code with explicit PRE tags...


more code
and so on


(07 Oct, 11:21) Breck Carter

When you get back, if you just want to send me all your data via email, I can either (a) post an answer here, or more likely (b) post a formatted question for you... breck dot carter at gmail.

(07 Oct, 11:27) Breck Carter
showing 1 of 12 show all flat view
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](http://url.com/ "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: 05 Oct, 04:53

question was seen: 171 times

last updated: 07 Oct, 11:27

Related questions