I have a database setup and connected as a datasource for use in a simple shop system.
The way that i have it is that when the form loads it loads the stock levels of each item into variables, then when an order has been filled update said variables.
Then on exiting the form i want it to update the database with the new stock level variables from the form, and this is where the problem lays.
I'm calling the query like so:
where "QueryCall" is defined as a "DataSetTableAdapters.QueriesTableAdapter"
The problem is I have no clue as to how to pass parameter values into the query to update each stock item.
the SQL code for the query is as follows:
(Yes the table is called stock, and so is the column heading, terrible idea)
So the question comes down to this: How do I structure the query to update from a parameter, and how would said parameter be passed?
Thanks in advance
The way that i have it is that when the form loads it loads the stock levels of each item into variables, then when an order has been filled update said variables.
Then on exiting the form i want it to update the database with the new stock level variables from the form, and this is where the problem lays.
I'm calling the query like so:
VB.NET:
QueryCall.Stock_1_Stock_Updater()
where "QueryCall" is defined as a "DataSetTableAdapters.QueriesTableAdapter"
The problem is I have no clue as to how to pass parameter values into the query to update each stock item.
the SQL code for the query is as follows:
VB.NET:
UPDATE Stock
SET Stock.Stock = ?
WHERE (ID = 1)
(Yes the table is called stock, and so is the column heading, terrible idea)
So the question comes down to this: How do I structure the query to update from a parameter, and how would said parameter be passed?
Thanks in advance