Database File Creation : Operation cannot be completed because the database is closed

All is in the title… I’m trying to bring my apps from realstudio to xojo but I have troubles with database file creation…

My RealStudio script doesn’t work anymore and even if I use SQLiteDatabase, still won’t work…

I always get Error 1 : Operation cannot be completed because the database is closed.

I have a global variable db and here is my script :

[code]function createDB( f As FolderItem)

db = new SQLiteDatabase
db.DatabaseFile = f
db.EncryptionKey = “My Encryption Key”
if( db.createDatabaseFile ) then
// Do something…
end if


In debug mode, I get this error at the second line «db.DatabaseFile = f»

Any idea?

if not f.Parent.Exists then
MsgBox f.Parent.NativePath + “Exists = false”
end if

if not f.Parent.IsWriteable then
MsgBox f.Parent.NativePath + " IsWriteable = false"
end if

I think I’ve found the problem : my AppWrapper Script that makes unwritable Documents, Desktop and everything else…

Thanks for your help

Now I have to find how to sandbox correctly my App!