Ver Mensaje Individual
  #22 (permalink)  
Antiguo 13/11/2009, 20:20
carnero
 
Fecha de Ingreso: noviembre-2009
Mensajes: 315
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: texbox y areglo

ajajajaaj
no me siento identificado ajajaaja

una consulta

Código:
Private Sub Command1_Click()
Set cnn = New ADODB.Connection
Set rst = New ADODB.Recordset

cnn.Open "Provider=SQLOLEDB; " & _
"Initial Catalog=LICEO; " & _
"Data Source=s; " & _
"integrated security=SSPI; persist security info=True;"
SQL = "select nombres,apellido,rut,usuario, pass from ALUMNO where rut = '" + Text1.Text + "' and pass = '" + Text2.Text + "'"
rst.Open SQL, cnn, adOpenDynamic, adLockOptimistic
'rut = rst.Fields("rut")

If rst.Fields(0) = "" Then
    SQL = "select nombres,apellido,rut,usuario, pass from ALUMNO where rut = '" + Text1.Text + "' and pass = '" + Text2.Text + "'"
    MsgBox "¿Profe?", vbOKCancel, "Salir"

End If
End Sub
la cosa es quiero que primero busque en una base de dato despues en otra y en otra, pero no me sale no se que poner donde esta en rojo me sale error de automatizacion