1
« en: Viernes 22 de Julio de 2005, 19:49 »
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
GloConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=direccion_ip;DATABASE=tabla_de_la_DB;UID=usuario;PWD=;OPTION=16427"
Set conn = New ADODB.Connection
conn.ConnectionString = GloConnectionString
conn.CursorLocation = adUseClient
conn.Open
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM clientes", conn, adOpenStatic, adLockOptimistic 'como ejempl.
While Not rs.EOF
Form1.List1.AddItem (rs!nombre)
Form1.List2.AddItem (rs!apellido)
Form1.List3.AddItem (rs!telefono)
Form1.List4.AddItem (rs!direccion)
rs.MoveNext
Wend
rs.Close
----------------------------------------------------------------------
Espero que te sea de ayuda.