By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,248 Members | 1,621 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,248 IT Pros & Developers. It's quick & easy.

Searching for a specific record in a form

P: n/a
Hello,
I use the VS .NET 2003.
Say I have a Windows form (with C# code, of course) which is connected
to a database to one table. I can browse through the records, but I
don't know how to accomplish a search for a specific record.
I would like to have a button that by clicking it, a response window
will be opened. Say that the search will be according a specific
column of the table, so by filling a value to a Text Box for that
column and clicking an OK button - the desired record will show up.
Any detailed help will be appreciated.

David
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

If you want to search in the table Company for ID 385

dataset["company"].Select("ID = 385");

it returns an array of row that matches the criteria.

If your dataset is connected to a datasource, you can change the filter of
your defaultview property of the table into your dataset. .

That's it :-)

Laurent

"David" <ke*******@yahoo.com> wrote in message
news:ce**************************@posting.google.c om...
Hello,
I use the VS .NET 2003.
Say I have a Windows form (with C# code, of course) which is connected
to a database to one table. I can browse through the records, but I
don't know how to accomplish a search for a specific record.
I would like to have a button that by clicking it, a response window
will be opened. Say that the search will be according a specific
column of the table, so by filling a value to a Text Box for that
column and clicking an OK button - the desired record will show up.
Any detailed help will be appreciated.

David

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.