ACCION
Tengo una tabla llamada [Usuarios] y dos campos
Usuario_u | Contrasena_u
carlos | 12345
Pero al ingresar [carlos] y [12345] me da usuario incorrecto.
creo que este codigo no me esta funcionando
BOTON INGRESAR
sDatabaseFile = _SourceFolder.. "\\AutoPlay\\Db\\Sistema.db";
db = SQLite.Open(sDatabaseFile)
nLastError = Application.GetLastError()
if nLastError ~= SQLite.OK then
Dialog.Message("Error de Apertura de Base de Datos", SQLite.GetLastErrorString());
end
bNewRecord = true
Usuario_u | Contrasena_u
carlos | 12345
Pero al ingresar [carlos] y [12345] me da usuario incorrecto.
creo que este codigo no me esta funcionando
elseif SQLite.QueryToTable(db, "Select * from Usuarios WHERE Usuario_u='"..sUsuario.."' ") then
BOTON INGRESAR
sUsuario = Input.GetText("inp_usuario");
sContrasena = Input.GetText("inp_contraseña");
if (sUsuario == "") or (sContrasena == "") then
Label.SetVisible("Label3", true); -- campos vaios
Label.SetVisible("Label4", false);
Label.SetVisible("Label5", false);
elseif SQLite.QueryToTable(db, "Select * from Usuarios WHERE Usuario_u='"..sUsuario.."' ") then
Label.SetVisible("Label3", false);
Label.SetVisible("Label4", true); -- Error usuario o contrasena
Label.SetVisible("Label5", false);
else
Label.SetVisible("Label3", false);
Label.SetVisible("Label4", false);
Label.SetVisible("Label5", true); -- Bienvenido
end