Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Is FindBy<Key> Method applicable to design time dataset

Reply
Thread Tools

Is FindBy<Key> Method applicable to design time dataset

 
 
Keith
Guest
Posts: n/a
 
      02-07-2004
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
 
Reply With Quote
 
 
 
 
Keith
Guest
Posts: n/a
 
      02-08-2004
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?

http://www.velocityreviews.com/forums/(E-Mail Removed) (Keith) wrote in message news:<(E-Mail Removed). 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple error : method format(String, Object[]) is not applicable for the arguments (String, String) ankur Java 1 08-27-2007 06:31 AM
Why friendship not applicable to function arguments Ninan C++ 4 06-29-2006 09:47 PM
When is enum type applicable? - Java 2 07-24-2005 09:14 AM
Is MVC architecture applicable for web environment?? ketulp_baroda@yahoo.com Python 3 02-27-2004 04:47 PM
SOAP applicable in this scenario ? Tristan Java 1 01-26-2004 05:58 PM



Advertisments