Ver Mensaje Individual
  #5 (permalink)  
Antiguo 30/12/2005, 22:59
Avatar de Stickmaster2004
Stickmaster2004
 
Fecha de Ingreso: septiembre-2004
Ubicación: Barranquilla
Mensajes: 568
Antigüedad: 19 años, 8 meses
Puntos: 0
En las FAQ'S

pERO SIN EMBARGO PUES YO HICE ALGO CON LA CONEXION Y LE HICE ALGO CON EL DATACOMBO AQUI ESTA EL CODIGO, COMO DECIA GEOAVILA YA ESTA EN LAS FAQS SOLO HE AGREGADO ALGO PARA DARLE ALGO MAS DE FUNCIONALIDAD:

Private Sub Form_Load()
Dim Cxn As ADODB.Connection
Dim AdoS As ADODB.Recordset
Dim CxnFac As String
Set Cxn = New Connection
Cxn.CursorLocation = adUseClient
CxnFac = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Database=maneja dor;"
Cxn.Open CxnFac ' Abrimos la conexion
Set AdoS = New Recordset
AdoS.Open "Select * From clientes", Cxn, adOpenStatic, adLockOptimistic ' Abrimos el REcordset y esta listo para usar
MsgBox AdoS!nombre

While (AdoS.EOF = False) ' hay registros mientras que final de archivo(EOF) sea falso

Set DataCombo1.DataSource = AdoS
Set DataCombo1.RowSource = AdoS
DataCombo1.BoundColumn = "edad" 'guardamos internamente el valor del campo id que corresponde al nombre que escojamos
DataCombo1.ListField = "nombre" 'permite llenar la lista







AdoS.MoveNext ' que mueva uno hacia adelande

Wend 'Asi se cierra en mientras que en visual Basic

End Sub
__________________
Solo el que se basa en conocimiento basico y cultiva el aprendizaje obtendra sabiduria