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