How would I find a row with a column value? Say Im looking for people with the name "Lance" then once ive found Lance display the row of info for lance. Ive tried using select but cant seem to get it to work. Here is my code.
I tried that new bit of code and it just prints out the same line twice, which is row 3 when it should print out rows 3 and 4. Here is the code im working with..I added another row, so there are two rows with the name Lance.
Can this line hold more then one row at a time?
DataRow[] rows = table.Select("[First]='Lance'");
Staff, Why don't you do create DataTable to store the data separately, then to create the DataTable is just using a "for"
Then you have something like this:
''-----------
dim dataArray as ArrayList = GetData();
for integer i = 0 to dataArray.count - 1
{
Row = table.NewRow();
Row["ID"] = dataArray(0)(i);
Row["FIRST"] = dataArray(1)(i);
Row["AGE"] = dataArray(2)(i);
table.Rows.Add(Row);
}
next
''-----------
With this you create evething rows your datatable, sure you need store data in ArrayList, and you can do for columns too.
Sorry my mistake english, I'm Brazilian, my english is basic.
:-)
Last edited by flavioweb1; Jun 25th, 2009 at 12:10 pm.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.