Hi ,
I am new to VB.NET.I am creating an database windows application in VS2010 and SQL server 2008 express.In one of my form i have a datagrid.
My requirement is that i want to display the sum of an column of a DB table and other related data from other tables in the datagrid which is having 4 fields :
1. MatNo , 2.Quantity ,3. Opening Stock , 4. Closing Stock
Db table1 hav following fields : MatNo , Qty1
Qty1 is the field for which i hav to find the sum against MatNo entered by user.
In Db table2 hav again following fields : MatNo , Qty2
Mapping of data to datagrid :
1. MatNo : will contain the Matno entered by user.User can also enter a range of material like from 1000 to 2000.
2. Quantity : For each of the material entered calculate sum of QTY1 from Db table1.
3. Opening Stock : value in Quantity field of datagrid - value of QTY2 from Db table2 based on some select query ).
4. Closing Stock : value in opening stock of datagrid - value of QTY2 from Db table2 based on some select query )
what could be the best way to do it.I am using VB.net windows form with SQL