通过vb脚本连接Infobright数据库

时间:2013-06-04 06:44:38

标签: vbscript infobright

任何人都可以告诉我如何通过vb脚本连接infobright数据库。我写了一段代码,但它显示错误:

provider can not be found.

我写的代码是:

Option Explicit
Dim conn, sqlstr 

sqlstr = "SELECT COLLATION_NAME FROM COLLATIONS"


'Database connection info
set Conn = CreateObject("ADODB.connection")
Conn.ConnectionTimeout = 30
Conn.CommandTimeout = 30
conn.open("Provider=Microsoft.Jet.OLEDB.4.0;Database=information_Schema;Username=root;Password=''")

dim  showList

Set showList = conn.execute(sqlstr)

while not showList.eof

            Wscript.echo "Collation Name:" & showList("COLLATION_NAME")

showList.MoveNext
WEND

conn.close

1 个答案:

答案 0 :(得分:0)

安装MySQL Connector / ODBC 5.1并使用如下所示的连接字符串

connString =“Driver = {MySQL ODBC 5.1 Driver}; Server = ServerAddress; Database = DataBase; User = Username; Password = Password;”