JP7001627
Posts: 0
Joined: Wed Jul 23, 2014 12:35 pm

update database while a button is clicked

Good day, I'm trying to update the status of an item when i am clicking a button

Example:
Image

I would like to update the database whenever one of the button (Avail/NotAvail) is clicked.

I have created the database update service but how do I update the table with the button click.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

update database while a button is clicked

Hello,

You would need to invoke the service on button click event.

JP7001627
Posts: 0
Joined: Wed Jul 23, 2014 12:35 pm

update database while a button is clicked

Sorry I forgot to mention that Yes i know tis part but i would like to know how to update the database with the right value

Example

Table format:
Item_id | Item_name | Item_status

0025 | Laptop | Available

Now when I have the Item_id sored in a Local storage variable and click on Not Available how do I get the data for Item_Id 0025 to have it Item_status update To Not Available

Usually i would use a SQL query like:

UPDATE Table_Name
SET Item_status = 'Not Available'
Where Item_id = '0025'

When i click on the button

Return to “Issues”