Hello.
I have a Data base with a table called Stock_Adjustment_Table and a column called STOCKRECORDNUMBER.
I use the following code to count the number of times that the value datarowGOODS_RECEIPTS_DG.Item("STOCKRECORDNUMBER") appears in the STOCKRECORDNUMBER
Now I also have the data base in a dataset called ds, with a table called STOCK_ADJUSTMENT_TABLE which has been filled with the code.Code:Dim command7 As FbCommand = connection.CreateCommand() command7.Connection = connection command7.CommandText = "select count(*) from STOCK_ADJUSTMENT_TABLE where STOCKRECORDNUMBER = " & datarowGOODS_RECEIPTS_DG.Item("STOCKRECORDNUMBER")
My question, is there a way to count the information I want directly from the dataset table instead of the way I am doing at present by counting from the data base?Code:'fill the dataset/table with STOCK ADJUSTMENT TABLE data daGOODS_RECEIPTS.SelectCommand.CommandText = "SELECT * FROM STOCK_ADJUSTMENT_TABLE " daGOODS_RECEIPTS.FillSchema(ds, SchemaType.Source, "STOCK_ADJUSTMENT_TABLE") daGOODS_RECEIPTS.Fill(ds, "STOCK_ADJUSTMENT_TABLE")
Thank you.




Reply With Quote
