Link to home
Start Free TrialLog in
Avatar of x50Fade
x50Fade

asked on

New to ADO.NET >> How Do I find a specific row in a dataset, and then display it's data.

Hi

I would like to know how to do a simple "select in listbox..display appropriate data in textboxes"

I.E.

Select Order Number in listbox, when clicked, update textboxes with specific order details.

I can get the data into a dataset, then inot a listbox.....but i really don't want to step through all the records and check when the value is whatever is selected in the listbox...

I tried playing around with the dataview's rowfilter...but I'm not getting anywhere...

Cheers and Thanx

Fade
ASKER CERTIFIED SOLUTION
Avatar of natloz
natloz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of x50Fade
x50Fade

ASKER

Right..I see

One more thing...Do we have to use the primrary key when using the rowfilter?

I gotta confess...my database design has never really been according to general practices.....So some of my old App's DB's will not have very usefull PK's, and i might need to use that data.

Regards
Fade
You can filter on any column of you dataset...not just the primary key...so I gather you are going to filter on the Order Number? If it is guaranteed unique you can probably think of it as a primary key I suppose.
Avatar of x50Fade

ASKER

Oh, OK

The reason why I'm asking is that the documentation says that you must filter on the primrary key.....so I tough that ADO.NET might check if the column you supply actually is a primrary key....