Hi,
I created a database with one table and one record.
No error is reported, but going to see the database, it is created, but empty (no table and no record) and in addition creates a database with ".db-journal" extension.
Where is the error?
Thank you
I created a database with one table and one record.
No error is reported, but going to see the database, it is created, but empty (no table and no record) and in addition creates a database with ".db-journal" extension.
Where is the error?
Thank you
B4X:
sub my_sub
If File.Exists(Main.DIRECTORY, DBFileName) = False Then
SQL2.Initialize(Main.DIRECTORY, DBFileName, True)
CreateDataBase
Else
SQL2.Initialize(Main.DIRECTORY, DBFileName, True)
End If
. . . . . . .
Query = "INSERT INTO TABLEFASE1 VALUES (?, ?, ?)"
SQL2.ExecNonQuery2(Query, Array As String(dato1,dato2,dato3))
SQL2.close
end sub
Sub CreateDataBase
Dim Query As String
Query = "CREATE TABLE TABLEFASE1 (dato1 INTEGER, dato2 TEXT, dato3 TEXT)"
SQL2.ExecNonQuery(Query)
End Sub