DSN-less ODBC connect string for legacy Sybase Adaptive Server Anywhere

一个人想着一个人 提交于 2019-12-10 17:53:00

问题


This is a failed response to this article: Sybase, VB and ADO

I just did a VB6 project connecting to a legacy ASA 7 database. After failing to use ASAProv OLEDB provider altogether (for one reason or another) and much research, here is the connect string for OLEDB Provider for ODBC shim for a DSN-less ODBC driver connection:

Provider=MSDASQL.1;Driver={Adaptive Server Anywhere 7.0};CommLinks=TCPIP,SharedMemory;EngineName=<database_name>;UID=DBA;PWD=SQL

where <database_name> is the instance name dbeng7.exe is running the db under. Check the engine log for 'Starting database "<database_name>"'.

You can find all the valid property names for an ODBC connect string by creating a system DSN, adjust settings and inspecting values HKLM\SOFTWARE\ODBC\ODBC.INI\<system_dsn> key.

The available ODBC drivers that can be used under Driver property of the MSDASQL provider connect string are subkeys of HKLM\SOFTWARE\ODBC\ODBCINST.INI

Apparently Sybase login passwords are case insensitive which I find quite hilarious.

cheers
</wqw>


回答1:


Wow, I actually wrote that article in the last millennium, I believe.

Let me take this point by point.

  1. OLEDB provider works fine for it, I remember using them from back in the day. Just follow instructions here: http://www.vbrad.com/article.aspx?id=81 on how to create a connection string.

  2. For ODBC, going to http://www.connectionstrings.com/ has never failed me. They got connection strings up wazoo.



来源:https://stackoverflow.com/questions/453970/dsn-less-odbc-connect-string-for-legacy-sybase-adaptive-server-anywhere

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!