cancel
Showing results for 
Search instead for 
Did you mean: 

VBA Access Sybase SQL Anywhere 17

2,258

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

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

'starts the server etc.

sConnStr = "DRIVER=SQL Anywhere 17;Database=C:\\ProgramData...\\xxx.db;ENG=..DBSRV;DBN=Da;UID=yyy;PWD=xxx" 'starts the server etc. it works 20201023

'connects to a running server

sConnStr = "DRIVER=SQL Anywhere 17;ENG=..DBSRV;DBN=..;UID=yyy;PWD=xxx" 'connects to a running server, it works 20201023

Thank you everybody for your precious help!

VolkerBarth
Contributor
0 Kudos

Note, this will only work when the database is expected to run on the local machine, i.e. not on a network server because a SQL Anywhere database client cannot itself start a database server on a remote machine.

Note, if the database is expected to run only locally, you can combine that into one connection string via using the START connection parameter, such as...

"START=dbeng17 -xd -c 16M;Server=DBSRV;DBF=C:\\ProgramData...\\xxx.db;DBN=Da;UID=yyy;PWD=xxx"
0 Kudos

thank you Volker. May be I will have same more questions in the future. Johannes