Saranik Dey
Saranik Dey

Reputation: 1

Infobright database connection through vb script

Can anyone tell me how to connect infobright database through vb script. I have written a code but it shows an error:

provider can not be found.

The code I have written is:

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

Upvotes: 0

Views: 262

Answers (1)

Craig Trombly
Craig Trombly

Reputation: 464

Install MySQL Connector/ODBC 5.1 and use a connection string like the following

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

Upvotes: 0

Related Questions