Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrary db folder location for Windows #22

Open
brodycj opened this issue Aug 18, 2017 · 4 comments
Open

Arbitrary db folder location for Windows #22

brodycj opened this issue Aug 18, 2017 · 4 comments

Comments

@brodycj
Copy link
Contributor

brodycj commented Aug 18, 2017

I got a request for help with using an arbitrary database folder location on Windows.

@itbeyond
Copy link

itbeyond commented Sep 4, 2017

@brodybits I have tried and tried to make this work - I can pass the right file details, I can even create and open the files from the Javascript bridge programs however, I ran some more searches for this problem and found this - https://stackoverflow.com/questions/35084058/uwp-app-sqlite-access-database-in-documents-library it seems to indicate that the task of opening files outside of the apps defined folders is not possible without modifications to the SQLite core code to convert to Stream access.

@itbeyond
Copy link

itbeyond commented Sep 4, 2017

More research lead me to https://www.codeproject.com/Articles/879846/Using-SQLite-Databases-in-Any-Folder-in-WinRT and I am not much of a C++ programmer - I spent several hours trying to implement this in the code but I am really clutching at straws. I can get the source from the project into the module and it even compiles but I am not really sure how to run it and get it Initialized(). Can anyone shed any light on this?

@brodycj
Copy link
Contributor Author

brodycj commented Oct 8, 2017

@itbeyond please accept my apologies for the delay, I have been busy with a couple major deadlines this month. Planning to look at this in November.

@brodycj
Copy link
Contributor Author

brodycj commented Oct 8, 2017

@itbeyond I saw your work in https://github.com/itbeyond/Cordova-sqlite-evcore-extbuild-free/commit/fd7ed50a22d4f2d3ae7b9e0dadd729b1cfe2ea1c and have the following comments:

It would be ideal if you would resolve the folder from the UWP FS key in your application code (or maybe in another plugin) and send the resolved path to the plugin. This would be more flexible in case someone else decides to use cordova-plugin-file to get the folder path and send to the plugin.

To help isolate the problem you may also want to try using the Windows storage API calls to resolve the FS path then read/write a simple text file, all in JavaScript, before attempting with the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants