Código:
lo quiero aber es como pedo decir " si el adodc2 no entrega valores entonces haga tal cosa, espero se entienda la pregunta y otra duda que se me acaba de ocurrir , hay forma de llenar el case, entero, desde una tabla sql??Select Case Combo1.Text Case "MATEMATICAS" a = "1" Case "LENGUAJE " a = "2" Case "HISTORIA " a = "3" End Select If B = "" Then MsgBox ("Seleccione Asignatura"), 0, ("Error") Else Adodc2.Refresh Adodc2.RecordSource = "select fecha1,fecha2 from fechas where '" + a + "' = cod and '" + curso + "' = curso" Adodc2.Refresh Adodc2.Refresh End If
por ejemplo no todos los cursos tienen los mismos rramos, entocnes no necesitan las mismas fechas de pruebas
otramas ajjaajajaaj
tengo el siguiente codigo, para login
Cita:
el codigo funciona como debe, pero no discrimina MAYUSCULA de minusculas 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 * from ALUMNO where usuario = '" + Text1.Text + "' and pass = '" + Text2.Text + "'"
rst.Open SQL, cnn, adOpenDynamic, adLockOptimistic
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox ("Ingrese los datos requerido"), 0, ("Error")
ElseIf rst.EOF = False Then
rut = rst.Fields("rut")
nombres = rst.Fields("nombres") + rst.Fields("apellido")
curso = rst.Fields("curso")
alumnos.Show
Unload Me
ElseIf Combo1.Text = "PROFESOR" Then
SQL = "select * from PROFESOR where usuario = '" + Text1.Text + "' and pass = '" + Text2.Text + "'"
Set rst = New ADODB.Recordset
cnn.Open "Provider=SQLOLEDB; " & _
"Initial Catalog=LICEO; " & _
"Data Source=s; " & _
"integrated security=SSPI; persist security info=True;"
SQL = "select * from ALUMNO where usuario = '" + Text1.Text + "' and pass = '" + Text2.Text + "'"
rst.Open SQL, cnn, adOpenDynamic, adLockOptimistic
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox ("Ingrese los datos requerido"), 0, ("Error")
ElseIf rst.EOF = False Then
rut = rst.Fields("rut")
nombres = rst.Fields("nombres") + rst.Fields("apellido")
curso = rst.Fields("curso")
alumnos.Show
Unload Me
ElseIf Combo1.Text = "PROFESOR" Then
SQL = "select * from PROFESOR where usuario = '" + Text1.Text + "' and pass = '" + Text2.Text + "'"
como hago eso?
gracias denuevo, llegara el dia que pueda responder yo jajaajjaja