According to the plugin documentation using this code will open the database, but also create a new database if one is not present.
The location called 'default' in the code snippet refers to this location: "//data/data//databases/"
This location is not visible to browsing. My code in AB is using the "openDatabase" method, but I don't know if it is working. The code that creates the database, also executes some SQL to create tables if they do not exist.
Using Javascript as documented in the plugin, should produce expected results in AB since it compiles as JS.
David
The path C:\Sync\Ryan\GitHub Repos\PTS Mobile\PTS_Compiled\www\app\files on my laptop contains the ptd.db3 file but it does not appear on the Android emulator I am testing with.
This is the path I see on the Android emulator: "com.ptsapp.pts/files/" but that folder is empty.
I dont think SQLite database files can be placed in that directory
Hi David
I have the database pts.db3 loaded in the file manager. On the emulator I have navigated to Files --> Android SDK built for x86 --> Android -->Data --> com.ptsapp.pts --> files -->
That location is empty
How can I tell if my database was deployed to 'app/files/'?
So I added the SQLite database to the files located in the project file manager
Would the location parameter in the openDatabase function be: location: 'app/files/'?
Hi David
I have this custom plugin referenced in the app settings Cordova area: cordova-sqlite-storage
I did end up wrapping the JS in
That did not seem to make any difference.
In fact, something is failing inside that JS and I not getting an alert from the error or success functions.
I have this code:
For some reason in any of the Javascript code I write in AB using StartJS/EndJS do not activate any of the alert(...); lines that I would like to see. Am I using it wrong?
How do I access the button index that is pressed in a Messagebox action?
Thank you David
If I do decide to use NewArray "arrDailyCrews" do I need to loop "window.App.RootScope.dailyCrews" to fill the new array or is it just a direct assignment?
I have the below code to query a SQLite database when the app is offline.
The results JS variable is an array of records.
I want to take "window.App.RootScope.dailyCrews = results;" and set "dailyCrews" to the NewArray "arrDailyCrews".
Is that needed or can I just use "window.App.RootScope.dailyCrews" as my array on the AB code side?
No problem David! I have my answer. :) I appreciate your prompt help.
The reason I ask is because I have a good number of JS functions for a sqlite plugin that I was thinking of wrapping in AB functions to make them easier to use in the UI views and events. Each of these AB functions would have multiple argument parameters that would be used in the JS portion of the AB function.
In my opinion, calling a "wrapper" AB function is easier in the views than setting up a JS function in the views
The JS functions are basically for CRUD operations and will be used in many locations of the program but will not change. Therefore I thought an AB "wrapper" function would be easier to call the JS functions multiple times in multiple locations. That is why I was asking about the window.App.RootScope object
I wrote a custom AB function with 2 parameters: "contract_name" and "active".
The AB function has some javascript in it using the tags StartJS/EndJS. I want to use the parameters passed into the AB function inside of the javascript.
Can the javascript consume the AB parameter values by using:
?
Thanks
I have studied the documentation of both the Dropdown and Select control. It looks like I can only populate the items with a simple array.
If I need to have an array with a key / value, how do I bind that array to these controls? For example:
I would like to set user_id to a variable when the user_name value is selected.
How is this possible?
Ryan
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.