Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Is FindBy<Key> Method applicable to design time dataset

 
Thread Tools Search this Thread
Old 02-07-2004, 12:31 PM   #1
Default Is FindBy<Key> Method applicable to design time dataset


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
  Reply With Quote
Old 02-08-2004, 06:15 AM   #2
Keith
 
Posts: n/a
Default Re: Is FindBy<Key> Method applicable to design time dataset
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46