Android Question Getting error

Itila Tumer

Active Member
Licensed User
Longtime User
I'm doing database operations on page x.
after
I come to the y page.
I get this error.


java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/user/0/b4a.example/files/SportExpertDB.db
 

DonManfred

Expert
Licensed User
Longtime User
The error says it all... You are opening a Database which is already opened.
Without knowing what you are doing and how it is hard to give any concrete advice.

Upload a small project which shoes the issue.
 
Upvote 0

Itila Tumer

Active Member
Licensed User
Longtime User
I don't understand where the problem is.
My code blog

Sub Service_Create

CurrentIndex = -1
RowNumber = 0
EditMode = "Add"
FilterQuery = ""
flagFilterActive = False
FilterBooleanOperator = "AND "


If File.Exists(File.DirInternal, "SportExpertDB.db") = False Then

File.Copy(File.DirAssets, "SportExpertDB.db", File.DirInternal, "SportExpertDB.db")

SQL1.Initialize(File.DirInternal, "SportExpertDB.db", True)

Else

SQL1.Initialize(File.DirInternal, "SportExpertDB.db", True)
End If

End Sub
 
Upvote 0
Top