Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/08/2007, 10:16
_cronos_
 
Fecha de Ingreso: marzo-2007
Mensajes: 50
Antigüedad: 18 años
Puntos: 0
De acuerdo Re: problemas con servidor MySQl y VB6

como haces el codigo para conectarte con la version 5.0 de odbc
por que yo me conecto asi con la 3.51, como seria con la 5.0

Código:
Private Sub ConnServer()
  'connect to MySQL server using MySQL ODBC 3.51 Driver
  Set conn = New ADODB.Connection
  conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
                        & "SERVER=localhost;" _
                        & " DATABASE=prueba;" _
                        & "UID=root;PWD=; OPTION=3"
conn.Open
End Sub

Private Sub OpenServer() 'Connect MySQL Server Without ODBC setup
    constr = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=;Extended Properties=" & Chr$(34) & "DRIVER={MySQL ODBC 3.51 Driver};DESC=;DATABASE=" & db_name & ";SERVER=" & db_server & ";UID=" & db_user & ";PASSWORD=" & db_pass & ";PORT=" & db_port & ";OPTION=16387;STMT=;" & Chr$(34)
    Set conn = New ADODB.Connection
    conn.Open constr
End Sub