|
-
Jun 5th, 2005, 10:47 PM
#1
Thread Starter
New Member
update database using SQL command?
Hi all
really stuck here. am trying to update a field in a row in my database from within a procedure. have a connection to the database (OleDBConnection1). Trying to run an Update statement that will update the table "ITEMS" column "Quantity" with a WHERE clause based on "ItemID"
something like this
UPDATE ITEMS SET Quantity = Quantity - intSoldQty ' from txtbox
WHERE ItemID = xxx 'this is also from a txtbox
no matter which approach I take I seem to come unstuck. I think the approach I would need to take is to create a SQL command and run it from the procedure but don't really know how to go about this, and can't seem to find anything useful on the internet. I can post my existing code and database if that would be useful...but if anybody could give me some generic code for creating a SQL command that will run straight onto a database I would really appreciate it
thanks in advance
cameron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|