从 VB 创建 Sybase 连接时出错
Error while creating Sybase Connection from VB
我正在尝试从 VB 连接到 Sybase ASE 并收到以下错误
Function createConnection() As ADODB.Connection
Dim ConnectString As String Dim ConnString As String
Set conn = New ADODB.Connection
.Mode = adModeReadWrite
.ConnectionTimeout = 15
.ConnectionString = "Provider=ASEOLEDB;" & _
"Server Name=" & Range("DBServerName") & _
";Initial Catalog=db;" & _
"User Id=user;" & _
"Password=password"
.Open
End With
Set createConnection = conn
End Function
如有任何帮助,我们将不胜感激。
我建议您先检查一下 odbcad here。
如果你能在那里找到任何关于 ASEOLEDB 的提及,那么你只是遇到了应用程序使用错误类型的驱动程序(32 位与 64 位)或连接字符串的问题。
但是正如错误消息所暗示的那样,您可能只缺少提供者 - 与 here 相同的问题。这些库通常是这些安装的一部分:
- SAP/Sybase日月光
- SAP/Sybase ASE PC 客户端光盘
- SAP/Sybase ASE SDK
所有这些都可以在 SAP portal, however you need a login to that place as this software is accessible only on purchase. You can find here a link of PC Client CD content (Sybase infocenter website) and a manual on OLEDB here 上获得。
不幸的是,只有可免费下载的 ASE 适用于 Linux,这对您没有用。也许你可以在那台W7机器上找到安装媒体...
下载并安装提供程序
http://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=19&Product=15
使用以下命令注册提供商
regsvr32 sybdrvodb.dll
regsvr32 sybdrvodb64.dll
我正在尝试从 VB 连接到 Sybase ASE 并收到以下错误
Function createConnection() As ADODB.Connection
Dim ConnectString As String Dim ConnString As String
Set conn = New ADODB.Connection
.Mode = adModeReadWrite
.ConnectionTimeout = 15
.ConnectionString = "Provider=ASEOLEDB;" & _
"Server Name=" & Range("DBServerName") & _
";Initial Catalog=db;" & _
"User Id=user;" & _
"Password=password"
.Open
End With
Set createConnection = conn
End Function
如有任何帮助,我们将不胜感激。
我建议您先检查一下 odbcad here。 如果你能在那里找到任何关于 ASEOLEDB 的提及,那么你只是遇到了应用程序使用错误类型的驱动程序(32 位与 64 位)或连接字符串的问题。
但是正如错误消息所暗示的那样,您可能只缺少提供者 - 与 here 相同的问题。这些库通常是这些安装的一部分:
- SAP/Sybase日月光
- SAP/Sybase ASE PC 客户端光盘
- SAP/Sybase ASE SDK
所有这些都可以在 SAP portal, however you need a login to that place as this software is accessible only on purchase. You can find here a link of PC Client CD content (Sybase infocenter website) and a manual on OLEDB here 上获得。 不幸的是,只有可免费下载的 ASE 适用于 Linux,这对您没有用。也许你可以在那台W7机器上找到安装媒体...
下载并安装提供程序
http://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=19&Product=15
使用以下命令注册提供商
regsvr32 sybdrvodb.dll
regsvr32 sybdrvodb64.dll