Question update database record?

kreuznach

Member
Joined
Sep 21, 2009
Messages
5
Programming Experience
1-3
i have a problem updating database using update query..
here i have a table name STOCK with column: "itemID" (primary key), "itemName" (text), "itemAvailable" (integer)

i have textbox "txtItemID", and button "Process"

all i want is, if i type itemID in the text box and hit "Process" button, typed item ID "itemAvailable" will be reduced by one..

i create update query like this: "UPDATE STOCK SET itemAvailable = itemAvailable - 1 WHERE itemID = '"& txtItemID &"'"
but it didn't work...

will somebody kindly show me the right query for updating? thanks in advance... :D
 
Back
Top