I installed my app on a tablet that renames the db with .bak extension and create a new db empty! It 'happened to anyone? What can it be?
CopyFileFromAssetToInternal(sDBName) sDBRoot = GetTargetInternalDir m_DB.Initialize(sDBRoot, sDBName) Sub CopyFileFromAssetToInternal(aFileName As String) As Boolean Dim TargetDir As String TargetDir = GetTargetInternalDir If File.Exists(TargetDir, aFileName) = False Then File.Copy(File.DirAssets, aFileName, TargetDir, aFileName) End If End Sub Sub GetTargetInternalDir() As String Dim TargetDir As String If File.ExternalWritable Then TargetDir = File.DirDefaultExternal Else TargetDir = File.DirInternal End If Log("Storage Internal Dir: " & TargetDir) Return TargetDir End Sub
I've tried everything! I think it's a problem of version SqlLite or tablet's operating system.Have you tried an alternate database file with the same end result ?
is it possible that your database is corrupt?
try recreating the database and table structure with no data and see if you get the same result
Just a few suggestions
If File.Exists(File.DirRootExternal, "Transmis/trasmis.db") = False Then File.MakeDir(File.DirRootExternal,"Transmis") File.Copy(File.DirAssets,"trasmis.db", File.DirRootExternal, "Transmis/trasmis") End If