I need to connect my work with SQLite, but do not save anything and not give me error. Do not know how to fix it . I hope someone help me please! Thank you
Activity Registro
Activity Registro
B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
'Declarar SQL
Dim sen As SQL
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private res_sesion As Button
Private registrate As Button
Private reg_usuario As EditText
Private reg_nombres As EditText
Private reg_apellidos As EditText
Private reg_correo As EditText
Private reg_fecha As EditText
Private reg_pass As EditText
'Declarar Variables
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout3")
If File.Exists(File.DirRootExternal,"dato.db") = False Then
File.Copy(File.DirAssets,"dato.db",File.DirRootExternal,"dato.db")
End If
sen.Initialize(File.DirRootExternal,"dato.db",True)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub registrate_Click
If reg_nombres.Text<>Null And reg_apellidos.Text<>Null And reg_usuario.Text<>Null And reg_pass.Text<>Null And reg_fecha.Text<>Null And reg_correo.Text<>Null Then
sen.ExecNonQuery2("INSERT INTO PERSONA (per_codigo,per_nombres,per_apellidos,per_usuario,per_pass,per_fecha,per_correo) VALUES(NULL,?,?,?,?,?,?)", Array As String(reg_nombres.Text,reg_apellidos.Text,reg_usuario.Text,reg_pass.Text,reg_fecha.Text,reg_correo.Text))
reg_apellidos.Text= ""
reg_nombres.Text=""
reg_correo.Text=""
reg_usuario.Text=""
reg_pass.Text=""
reg_fecha.Text=""
Else
Msgbox("Verifica que todos los campos esten llenos.","Advertencia")
End If
End Sub
Sub res_sesion_Click
Msgbox("Debe de tener una cuenta para Iniciar Sesión.","Advertencia")
StartActivity("Main")
End Sub