![]() |
|
|
|||||||
![]() |
ASP Net - Is FindBy<Key> Method applicable to design time dataset |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 Keith |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi,
Forgot to mentioned that i did set the datakey of my DataGrid1 to PROD_DET_ID and also ... dr = dsProdInfo.dtProdHdr.FindByPROD_DET_ID() shd be as dr = dsProdInfo.dtProdHdr.FindByPROD_DET_ID(key) any one has any idea what i missed out? (Keith) wrote in message news:<. com>... > 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 Keith |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cancelling Timer and TimerTask threads | wfalby | Software | 1 | 04-30-2009 01:04 PM |
| Error: Physical sythesis tool PALAC is not supported by Formal Verification tool Conf | bbiandov | Software | 0 | 12-22-2008 05:25 AM |
| Dawn Of Internet Video, REVENGE of Time Warner Cable! | Derek Currie | DVD Video | 4 | 01-21-2008 09:28 PM |
| This is incredible! | jc_ice | DVD Video | 1 | 08-13-2006 10:47 AM |