Ver Mensaje Individual
  #15 (permalink)  
Antiguo 13/11/2008, 23:07
papurri
 
Fecha de Ingreso: agosto-2008
Ubicación: Frente al pc
Mensajes: 71
Antigüedad: 16 años, 7 meses
Puntos: 2
Respuesta: Conexion y consulta MySQL con VB 6.0

ublic db As ADODB.Connection
Public tabla As ADODB.Recordset
-------------------------------------------
Public Sub Conexion()
' Realiza la conexion con la base de datos
On Error GoTo msgError
Set db = New ADODB.Connection
Set tabla = New ADODB.Recordset
db.CursorLocation = adUseClient
db.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=biblioteca;UID=r oot;PWD=;"
db.Open
Exit Sub
msgError:
MsgBox Err.Number & " - " & Err.Description, vbCritical, "Error"
End Sub