Hi,
I get sporadically this error.
Erel wrote here that one should initialize the SQL object in the Starter and never re-initialize it.
I do initialize it the first time in Service_Create of the Starter Service.
But I backup the database file now and then. So I have to
The Sub resides in a code class and is called by several Activities.
I don't think it's a good idea to copy the file without closing it.
But what's the right way to do that without closing and re-initializing SQL?
I get sporadically this error.
Erel wrote here that one should initialize the SQL object in the Starter and never re-initialize it.
I do initialize it the first time in Service_Create of the Starter Service.
But I backup the database file now and then. So I have to
B4X:
Sub DatenSicherung()
' ...
Main.SQL1.close
File.Copy(Main.CSVdir.internPath, Main.DatabaseName, zielDir, "DatenSicherung.db")
Main.SQL1.Initialize(Main.CSVdir.internPath, Main.DatabaseName, True)
End Sub
I don't think it's a good idea to copy the file without closing it.
But what's the right way to do that without closing and re-initializing SQL?