I have 2 tables in sql , one is called stock and the other stock warning
the stock table has columns ' Pid, pdescr,current stock, stock warning' this shows up in datagridview
2nd table(stock warning) has columns 'pdescr, current stock' showing in datagridview
in the stock table when the 'current stock' is less than the set 'stock warning ' number , i want the pdescr and current stock data to show in the stock warning table sending the data to the datagridview
how can this be done?

3 Years
Discussion Span
Last Post by Rahul47

Do you want to actually copy the data from one table to another or just display it on the screen that way? If you just want to display it, you might consider creating a view in the database.


i just need to display the data in the data gridview and maybe then add a print button so someone can print off if required.


When you update the Stock Table on Some Event, it should check if the Current Stock <= Warning Stock. And If that is True then Put a query updating Stock Warning table with Current Stock and pdecr Values.
And then populate the DataGridView

Do mention on which event you wish to Update the stock table.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.