### FindBy in Typed Dataset ###

  • Thread starter Thread starter Kiran
  • Start date Start date
K

Kiran

Hi,

There is FindByColName() function which is used to find a row in a table based on the column value.

for eg.

dsEmployees.tblEmployees.FindByFirstName("Kiran")

Now my typed dataset dsEmployees doesn't contain tblEmployees anymore, It contains a View in it(VewEmployees) and no primary key also.

Now How would I perform a similar function for this so that I can pass a column value and get a data row

Any Help will be appreciated

Thanks
Kiran
 
Hi Kiran,

You might set manually primary key in your typed dataset.
That will generate proper FindBy method.
Otherwise use a DataView.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

Hi,

There is FindByColName() function which is used to find a row in a table
based on the column value.

for eg.

dsEmployees.tblEmployees.FindByFirstName("Kiran")

Now my typed dataset dsEmployees doesn't contain tblEmployees anymore, It
contains a View in it(VewEmployees) and no primary key also.

Now How would I perform a similar function for this so that I can pass a
column value and get a data row

Any Help will be appreciated

Thanks
Kiran
 
Back
Top