4 Replies Latest reply on May 25, 2012 3:40 PM by vkhurana

    Connecting to database using ADODB

    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