Results 1 to 9 of 9

Thread: Connecting to MySQL from ADO in VB

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    10

    Connecting to MySQL from ADO in VB

    I am trying to connect to an online MySQL database from VB6 using ADO
    and I'm getting the following error. "data source name not found and no default driver specified"

    here's the code I'm using to try to connect.

    Code:
            Set conn = New ADODB.Connection
        Set rs = New ADODB.Recordset
        connectionstring = "Driver={MySQL ODBC 5.1 Driver};Data Source=URL,3306;Database=DBNAME;User=USERID; Password=PASS;Option=3;"
        conn.Open connectionstring
        rs.Open "SELECT * FROM card_prices", conn
    no doubt its simply my inexperience with this type of connection. I have plenty of experience with MySQL but none with these connection string jiggys.

    P.S. I've tried downloading the MySQL ODBC 5.1 Driver and installed it but no effect. Do I have to install the version matching my system or the one matching the server?
    Last edited by markmercer; Jul 9th, 2012 at 02:46 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width