Reading data from a dataset

S

sweetiecakes

Simple Googling only results filling controls with information -- not
this. The scenario is, that I have a whole table in my dataset. I know
the ID (autoincrementing integer field) of the row to grab data from in
the dataset. How do I get all the data of that row in the dataset?
 
C

Ciaran O''Donnell

dataSet.Tables[0].Select("ID = " + ID.ToString())[0].ItemArray;

will give you an array of the values in the row assuming the dataset is
called dataSet, its the first table, and the id number is in a variable
called ID.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top