
30/03/2006, 14:14
|
Usuario no validado | | Fecha de Ingreso: enero-2006
Mensajes: 5
Antigüedad: 19 años, 3 meses Puntos: 0 | |
Código:
Dim Sql As String
Dim Rst As New ADODB.Recordset
Sql = "Select * from usuarios where usuario = '" & UCase(Trim(Text1)) & "'"
With Rst
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Source = Sql
Set .ActiveConnection = cnn
.Open
If Not .EOF And Not .BOF Then
MsgBox "ya existe"
Else
.AddNew
!usuario = UCase(Trim(Text1))
!contraseña = UCase(Trim(Text2))
!nombre = UCase(Trim(Text3))
!nivel = UCase(Trim(Text4))
.Update
MsgBox "Registro Guardado"
End If
End With
|