Editable database

286 views
Skip to first unread message

Steve Garman

unread,
Mar 22, 2015, 7:57:26 PM3/22/15
to androi...@googlegroups.com
So, I've been playing with the DroidScript implementation of SQLite and have come up with a reasonably useable way to add and delete records and to edit individual values in records.

There is an spk of my app at this external link which will probably just start a download.

Feel free to explore it, add functionality, make improvements, rip out the terrible styles and replace them with proper CSS, learn what to do and (especially) what not to copy.

For basic usage:
  • If the table is empty, select "Populate DB" from the menu.
  • To add a record, use the "Add to database" button.
  • To delete a whole record, touch its "id".
  • To change any other value, touch it in the table.
  • To empty the table,  select "Remove all" from the menu.
If the data looks familiar, it is stolen from the famous Northwind database.

Fernando Remor

unread,
Mar 23, 2015, 1:14:09 AM3/23/15
to androi...@googlegroups.com
Tanks for share.

Felix A. Vargas A.

unread,
Aug 12, 2016, 10:38:28 PM8/12/16
to DroidScript
Thanks to share your code Steve, I was looking for a similar editable db. Can I save and retrieve de file directly from Google Drive?. Best regards.

Steve Garman

unread,
Aug 13, 2016, 4:24:12 AM8/13/16
to DroidScript
Felix,
it does not really seem to be practical to use Drive for this purpose using intents.

I guesd someone would need to write a Java plugin, using the Drive API.

Personally, I don't know anyone who has both the skills and the time.

Any volunteers?

Felix A. Vargas A.

unread,
Aug 14, 2016, 7:27:34 AM8/14/16
to DroidScript
Ok thanks.I was trying to edit a record but I am fighting with this error"Cannot set property 'object'of undefined" and this is the underlined code: globs.inputter.object = {id:id, field:field, deflt:deflt}; ...Thanks for your help

Steve Garman

unread,
Aug 14, 2016, 8:58:42 AM8/14/16
to DroidScript
When I was working on that, I kept saving test versions.

It sounds like I might have left a non-working version online.

There should ba a line of code
app.LoadScript('inputter.js',inpLoaded);

Can you check it has not been commented out.

John LaDuke

unread,
Aug 14, 2016, 11:53:01 AM8/14/16
to DroidScript
Uncommenting that line gives a 'circular json' error.

Steve Garman

unread,
Aug 14, 2016, 1:03:09 PM8/14/16
to DroidScript
Sorry, I haven't touched that project in an age.

It was an early proof-of-concept test.

I have replaced the copy online with another version which was the latest I had in my archive. It should be available from the same link http://hudl.sgarman.net/public/spk/asql_121b.spk

A quick test suggests it doesn't actually fall over.

Felix A. Vargas A.

unread,
Aug 14, 2016, 3:38:59 PM8/14/16
to DroidScript
Thanks a lot Steve. It seems that everything is OK :)
Reply all
Reply to author
Forward
0 new messages