K
Keith
Hi,
I created a dataset during run time and assigned it to the datagrid.
But i cant get the FindBy<Key> method to work. During design time, i
got a error "dtProdHdr is not a member of System.Data.DataSet" error
Is it that FindBy<Key> method is used only for DataSet generated
during design time by the wizard? Can i actually use FindBy<Key>
method if i am using a design time created dataset?
below is a sample of my codes
Shared dsProdInfo As DataSet
Shared dtProdHdr As DataTable
Shared dtProdDtl As DataTable
Dim myDataRow As DataRow
Sub myFunction()
dsProdInfo.DataSetName = "dsProdInfo"
dtProdHdr = New DataTable("dtProdHdr")
dtProdHdr.Columns.Add("PROD_CAT")
dtProdHdr.Columns.Add("PROD_TYPE")
dtProdHdr.Columns.Add("KIT_NO")
dtProdHdr.Columns.Add("PROD_DESC")
dsProdInfo.Tables.Add(dtProdHdr)
Dim dr as DataRow
' Error "dtProdHdr is not a member of System.Data.DataSet" occurs
below
dr = dsProdInfo.dtProdHdr.FindByPROD_DET_ID()
End Sub
Thanks for any advice
Keith
I created a dataset during run time and assigned it to the datagrid.
But i cant get the FindBy<Key> method to work. During design time, i
got a error "dtProdHdr is not a member of System.Data.DataSet" error
Is it that FindBy<Key> method is used only for DataSet generated
during design time by the wizard? Can i actually use FindBy<Key>
method if i am using a design time created dataset?
below is a sample of my codes
Shared dsProdInfo As DataSet
Shared dtProdHdr As DataTable
Shared dtProdDtl As DataTable
Dim myDataRow As DataRow
Sub myFunction()
dsProdInfo.DataSetName = "dsProdInfo"
dtProdHdr = New DataTable("dtProdHdr")
dtProdHdr.Columns.Add("PROD_CAT")
dtProdHdr.Columns.Add("PROD_TYPE")
dtProdHdr.Columns.Add("KIT_NO")
dtProdHdr.Columns.Add("PROD_DESC")
dsProdInfo.Tables.Add(dtProdHdr)
Dim dr as DataRow
' Error "dtProdHdr is not a member of System.Data.DataSet" occurs
below
dr = dsProdInfo.dtProdHdr.FindByPROD_DET_ID()
End Sub
Thanks for any advice
Keith