Hi,
Could someone please tell me why the database file gets saved perfectly, BUT, the “File could not be created” error message still displays (even though there is obviously no error)??
[code] Dim source As FolderItem = SpecialFolder.ApplicationData.Child(“Snippets Data”).Child(“Snippets.db”)
If source <> Nil Then
Dim dlg as New SaveAsDialog
Dim f as FolderItem
dlg.InitialDirectory = SpecialFolder.Desktop
dlg.promptText = "File Details"
dlg.SuggestedFileName = "Snippets Database.db"
dlg.Title = "Export Snippets Database"
dlg.Filter = FileTypes1.SQLite
f = dlg.ShowModal()
if f <> Nil then
If f.Exists Then f.delete
source.CopyFileTo f
ExportWindow.close
if f.LastErrorCode <> 0 then
MsgBox("File could not be created!")
else
MainWindow.m.DeliverNotification( MainWindow.CreateMessage )
end if
end If
else
MsgBox(“The snippets database seems to no longer exist?”)
end if[/code]