我試過下面的腳本,但我得到了一個錯誤:使用純vbscript連接到mysql 5.0數據庫?
dim cn, rs
set cn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
cn.connectionstring = "Provider=MysqlProv; Data Source=Adonis; User Id=mysqluser; Password = mysqlpass;"
cn.open
rs.open "select * from Countries", cn, 3
rs.MoveFirst
while not rs.eof
wscript.echo rs(0)
rs.next
wend
cn.close
wscript.echo "End of program"
它給了以下錯誤:
C:\mysql.vbs(6, 1) ADODB.Connection: Provider cannot be found. It may not be pro
perly installed.
當我用Google搜索一個ODBC連接我走到this頁面,我可以下載odbc 5.1連接器。想知道這是否足以連接到MySQL服務器5.0數據庫...?
沒有這個不行...我已經安裝了5.1連接器正確。 – deostroll 2009-09-02 09:51:03
什麼是錯誤信息? – 2009-09-02 09:54:35
同樣的事情... – deostroll 2009-09-02 09:58:11