Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/11/2012, 21:47
antonio2005pe
 
Fecha de Ingreso: agosto-2005
Ubicación: Peru-Lima
Mensajes: 225
Antigüedad: 18 años, 8 meses
Puntos: 0
Hacer pantalla de Login y consulta sql

Hola a todos, recien me decidi cambiarme a vb.net asi que estoy perdido, antes en vb usaba algo asi:
Código:
Sub CNBuscar(SQL As String)
    Set CN = New ADODB.Connection
    Set RSBuscar = New ADODB.Recordset
    CN.ConnectionString = "Driver={MySQL ODBC 5.1 Driver};Server=192.168.1.3;Port=3307;Option=131072;St mt=;Database=Sistema;Uid=root;Pwd=antoniope;"
    CN.Open
    RSBuscar.CursorLocation = adUseClient
    RSBuscar.LockType = adLockOptimistic
    RSBuscar.ActiveConnection = CN
    RSBuscar.Open SQL
End Sub
Código:
CNBUSCAR "Select * from Usuarios where ID='" & Text1.text & "'"
If RSBuscar.bof and RSBuscar.Eof then
     'USUARIO NO EXISTE
else
     if text2.text = RSBuscar!Password then
          'ENTRA
     else
          'INCORRECTO
     end if
end if
Quisiera tambien como correr los registros como el Recordset.
Busque por la red encontre como ejecutar comandos pero no se como es, alguien me podria ayudar con el conector .net de mysql porfavor.
__________________
La Sinceridad lo es TODO :si: