这就是我最终解决它的方法。
选项1:
从安装了 SQL Anywhere ODBC 驱动程序的计算机上获取以下文件的副本:
dbodbc8.dll
dbcon8.dll
dblgen8.dll
用这个创建一个 install.cmd 文件:
COPY %~dp0dbcon8.dll %SystemRoot%\system32\dbcon8.dll
COPY %~dp0dblgen8.dll %SystemRoot%\system32\dblgen8.dll
COPY %~dp0dbodbc8.dll %SystemRoot%\system32\dbodbc8.dll
regedit %~dp0SAS8.REG
pause
用这个创建一个 SAS8.REG 文件:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Adaptive Server Anywhere 8.0]
"Driver"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,73,00,79,\
00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,62,00,6f,00,64,00,62,00,\
63,00,38,00,2e,00,64,00,6c,00,6c,00,00,00
"Setup"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,73,00,79,\
00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,62,00,6f,00,64,00,62,00,\
63,00,38,00,2e,00,64,00,6c,00,6c,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
"Adaptive Server Anywhere 8.0"="Installed"
运行安装.cmd
这将在 Windows 安装在 C:\WINDOWS 中时起作用,否则编辑注册表项。
选项 2:
如果有人在客户端计算机中留下了 Powerbuilder CD 的副本,请查找文件夹 asa801runtime 并安装它以使 ODBC 驱动程序正常工作
编辑:
具有默认用户名/密码的示例连接字符串:
Driver={Adaptive Server Anywhere 8.0};UID=dba;PWD=sql;DatabaseName=base;EngineName=gestion;CommLinks=TCPIP(HOST=GRA06:2638)