0

我有一个在 Windows XP 中创建和编译的现有 VB 6 应用程序。它使用水晶报表 8。数据来自 DB2 数据库。最近该应用程序转移到Windows 7 平台。水晶报表版本 11 安装在该机器中。编译成功,但在运行时打开水晶报告时抛出错误“错误 20599;无法打开 SQL Server”。任何帮助将不胜感激。提前致谢。

4

2 回答 2

2

使用这个命令这对我有用

.Connect = "DSN=" & ODBCcon 名称 & ";UID=" & UID & ";PWD=" & PWD & ";DSQ=Const HKEY_LOCAL_MACHINE = &H80000002" '& lstrDBName

于 2015-05-22T07:22:23.830 回答
0

尝试这个

".Connect = "Driver={Mysql ODBC 3.51 Driver}; Server=localhost;port=3306; database=db; user=root; password=; option=3;"
于 2016-01-10T03:47:45.593 回答