vkhurana

Connecting to database using ADODB

Discussion created by vkhurana on May 25, 2012
Latest reply on May 25, 2012 by vkhurana

I am trying to connect to MYSQL database so that part property data can be fetched, however I am running into this problem...any ideas what I am doing wrong?

 

Set oConnection = CreateObject("ADODB.Connection")

Set oRecordSet = CreateObject("ADODB.Recordset")

 

oConnection.Open = "Driver={MySQL ODBC 3.51 Driver}; " & _

     "Server=qcae-pcb;Database=qc_lib_exp_rlslib;User=qc_dx;Password=abc123;"

 

strSQLQuery = "SELECT * FROM resistor WHERE PartNumber = '123456'"

 

oRecordSet.Open strSQLQuery, oConnection, 3, 3

 

error1.jpg

Outcomes