J Juan Vargas (Bioagro) Member Licensed User Longtime User Dec 15, 2023 #1 In the code posted by Erel (https://www.b4x.com/android/forum/t...list-of-other-related-methods.129897/#content), He uses a text file as an example. I have this file, master.db (a database), and a known input folder, lest say File.DirInternal & "/datafiles" Can anyone help me to use this file and copy to the target selected with the SaveAs code?
In the code posted by Erel (https://www.b4x.com/android/forum/t...list-of-other-related-methods.129897/#content), He uses a text file as an example. I have this file, master.db (a database), and a known input folder, lest say File.DirInternal & "/datafiles" Can anyone help me to use this file and copy to the target selected with the SaveAs code?
M Mahares Expert Licensed User Longtime User Dec 15, 2023 #2 Juan Vargas (Bioagro) said: Can anyone help me to use this file and copy to the target selected with the SaveAs code? Click to expand... I think this is the way. I have not used for a while: Code: Copy Wait For (SaveFile(File.OpenInput(File.DirInternal, "db1.db"), "application/octet-stream", "db1.db")) Complete (Success As Boolean) Upvote 0
Juan Vargas (Bioagro) said: Can anyone help me to use this file and copy to the target selected with the SaveAs code? Click to expand... I think this is the way. I have not used for a while: Code: Copy Wait For (SaveFile(File.OpenInput(File.DirInternal, "db1.db"), "application/octet-stream", "db1.db")) Complete (Success As Boolean)
J Juan Vargas (Bioagro) Member Licensed User Longtime User Dec 15, 2023 #3 Mahares said: I think this is the way. I have not used for a while: Code: Copy Wait For (SaveFile(File.OpenInput(File.DirInternal, "db1.db"), "application/octet-stream", "db1.db")) Complete (Success As Boolean) Click to expand... Thanks. I did. Im getting this message B4X: Copy Unexpected event (missing RaiseSynchronousEvents): ion_event Check the unfiltered logs for the full stack trace. ** Activity (main) Pause, UserClosed = false ** not closed Also, any way to create a directory in the destination selected? Upvote 0
Mahares said: I think this is the way. I have not used for a while: Code: Copy Wait For (SaveFile(File.OpenInput(File.DirInternal, "db1.db"), "application/octet-stream", "db1.db")) Complete (Success As Boolean) Click to expand... Thanks. I did. Im getting this message B4X: Copy Unexpected event (missing RaiseSynchronousEvents): ion_event Check the unfiltered logs for the full stack trace. ** Activity (main) Pause, UserClosed = false ** not closed Also, any way to create a directory in the destination selected?
M Mahares Expert Licensed User Longtime User Dec 16, 2023 #4 Juan Vargas (Bioagro) said: Check the unfiltered logs for the full stack trace. Click to expand... All I can tell you is check your unfiltered logs and see if you can close in on your issue by unchecking the filter in the logs pane on the right side of IDE. I had a chance to test the code with B4A 12.80, OS 13 and it worked for me. I saved the db file from xui.defaultfolder to DCIM\Camera\myfolder ( it allowed me to create the myfolder subfolder prior to saving. ). I then I copied the 7.45 MB db file my PC via explorer and was able to open it via DB Browser on PC with no corruption or issues. Last edited: Dec 16, 2023 Upvote 0
Juan Vargas (Bioagro) said: Check the unfiltered logs for the full stack trace. Click to expand... All I can tell you is check your unfiltered logs and see if you can close in on your issue by unchecking the filter in the logs pane on the right side of IDE. I had a chance to test the code with B4A 12.80, OS 13 and it worked for me. I saved the db file from xui.defaultfolder to DCIM\Camera\myfolder ( it allowed me to create the myfolder subfolder prior to saving. ). I then I copied the 7.45 MB db file my PC via explorer and was able to open it via DB Browser on PC with no corruption or issues.