Can't copy database [SOLVED]
Posted: Mon May 23, 2016 10:26 am
Hello,
I want to copy my database for backup purpose, but the following code doesn't work on Android, why?
########CODE#######
on mouseUp
#close database connection
put the connID of this stack into conID
revCloseDatabase conID
#backup
if the environment is "mobile" then
put URL ( "binfile:" & SpecialFolderPath("documents") & "/gamedb.sqlite" ) into URL ("binfile:" & the text of field "corrente" & "/gamedb.bak" )
else
#impostiamoci per lavorare con i percorsi relativi
set itemDel to "/"
set the defaultFolder to item 1 to -2 of (the effective fileName of this stack)
put URL ("binfile:" & the defaultfolder & "/gamedb.sqlite" ) into URL ("binfile:" & the text of field "corrente" & "/gamedb.bak" )
end if
#salviamo l'impostazione
answer "backup eseguito"
OpenStack #this is to reconnect to the database
go to card "principale"
end mouseUp
#####END OF CODE#####
I want to copy my database for backup purpose, but the following code doesn't work on Android, why?
########CODE#######
on mouseUp
#close database connection
put the connID of this stack into conID
revCloseDatabase conID
#backup
if the environment is "mobile" then
put URL ( "binfile:" & SpecialFolderPath("documents") & "/gamedb.sqlite" ) into URL ("binfile:" & the text of field "corrente" & "/gamedb.bak" )
else
#impostiamoci per lavorare con i percorsi relativi
set itemDel to "/"
set the defaultFolder to item 1 to -2 of (the effective fileName of this stack)
put URL ("binfile:" & the defaultfolder & "/gamedb.sqlite" ) into URL ("binfile:" & the text of field "corrente" & "/gamedb.bak" )
end if
#salviamo l'impostazione
answer "backup eseguito"
OpenStack #this is to reconnect to the database
go to card "principale"
end mouseUp
#####END OF CODE#####