B4J Question [BANano] [SOLVED] CRUD bug using ...Wait

Mashiane

Expert
Licensed User
Longtime User
Hi there

Attached is a project I am working on to test the BANanoSQL crud functionality using wait. This is meant to enable one to create/read/update/delete records on demand via button clicks. These are the buttons

  • Create Flight - add flight to the db
  • Read Flight - read an existing record from db
  • Update Flight - update an existing record
  • Delete Flight - delete record from db.
I have a bug with initial calls when each of the buttons are clicked, i'm sure I'm missing something. Create and Read are supposed to run a method to check if there is a record, this is a separate defined method. It does not fire initially.

To reproduce the bug

  • Generate the project and open the index.html file in browser
  • Open Console Log
  • Click Create Flight about 5 times - this is supposed to check for a record and then if it does not exist add it.
  • Click your browser refresh button
  • Click Create Flight 5 more times
  • Check the records in storage (the same record has been added over and over again)
  • Click Delete Flight
BANanoSQLCRUD.png


All the buttons seem to be working only the second time around. Thanks in advance.
 

Attachments

  • BANanoSQLCRUD.zip
    5.5 KB · Views: 294
Last edited:
Top