我最近在Windows 10 x64上安装了MySQL Community Server。
现在,使用32位ODBC连接的脚本VBScript不再起作用。
但是ODBC相同的驱动程序在Microsoft Visual Studio Professional 2013上可以正常工作。
ODBC x86
ODBC x64
错误是:
Error 1918. Error installing ODBC driver MySQL ODBC
5.3 ANSI Driver, ODBC error 13: The setup routines for
the MySQL ODBC 5.3 ANSI Driver ODBC driver could
not be loaded due to system error code 126: The
specified module could not be found. ...\myodbc5S.dll...
我尝试了这个建议,但没有成功。
我的代码如下。
Start_Time = Timer
Set cn = CreateObject("ADODB.Connection")
cn.Open "DRIVER={MySQL ODBC 5.3 ANSI Driver};SERVER=XXX;PORT=3306;DATABASE=XXX;USER=XXX;PASSWORD=XXX;OPTION=3;"
cn.CommandTimeout = 10000
cn.Close()
Set cn = Nothing
End_Time = Timer
Total_Time = FormatNumber(End_Time - Start_Time, 2)
If Err.Number <> 0 Then
MsgBox(Date() & vbcrlf & " " & Err.Number & vbcrlf & Err.Description)
Else
CreateObject("WScript.Shell").Popup "OK! " & vbcrlf & Now() & vbcrlf & "Total Time : " & Total_Time, 10, "OK"
END If
On Error GoTo 0
WScript.Quit
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句