I'm having an issue and can't figure out why this gives me a datatype mismatch.
I have attached a test project and hope someone can steer me where I have went wrong.
Here is the code also.
I have attached a test project and hope someone can steer me where I have went wrong.
Here is the code also.
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim SQL1 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.
Dim lblRow As Label
Dim txtName As EditText
Dim btnInsert As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Autoinctest")
'****Check and load the database****
If File.Exists(File.DirInternal, "autoinctest.db") = False Then
File.Copy(File.DirAssets, "autoinctest.db", File.DirInternal, "autoinctest.db")
End If
'****Initialize the database****
SQL1.Initialize(File.DirInternal, "autoinctest.db", False)
'*******************************
End Sub
Sub btnInsert_Click
SQL1.ExecNonQuery2("INSERT INTO table1 VALUES (?,?)", Array As String(Null, txtName.Text))
End Sub