Hello
I have a problem when trying to create an sqlite database. The database name is to be in the form "Name - date" like: "BradHen - 17022024.db"
When I use this code:
I get the error: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 1294): Could not open database
However if I use this code:
it works??
Am I missing something in the creation of "NewFileName" in the first example?
Your help is appreciated.
Brad
I have a problem when trying to create an sqlite database. The database name is to be in the form "Name - date" like: "BradHen - 17022024.db"
When I use this code:
B4X:
Dim MyPath as String = "/storage/emulated/0/Android/data/b4a.appname/files"
Dim TodaysdbSql As SQL
Dim NewOpCode As String = "TomHanks"
Dim DateString As String = DateTime.Date(DateTime.Now)
Dim NewFileName As String =NewOpCode & " - " & DateString & ".db"
Todaysdb=NewFileName
TodaysdbSql.Initialize(MyPath,Todaysdb,True)
However if I use this code:
B4X:
Dim MyPath as String = "/storage/emulated/0/Android/data/b4a.appname/files"
Dim TodaysdbSql As SQL
Todaysdb = "TomHanks - 17022024.db"
TodaysdbSql.Initialize(MyPath,Todaysdb,True)
it works??
Am I missing something in the creation of "NewFileName" in the first example?
Your help is appreciated.
Brad