How do I reference column values in a dataset?

  • Thread starter Thread starter Kombu
  • Start date Start date
K

Kombu

I've created a dataset and bound a number of textboxes to it. Now I
would like to concatenate a number of column values together and
display them in an unbound, read-only textbox. For example, FirstName
& " " & LastName.

How do I reference those column values from the dataset object?

TIA
 
ds.Tables(0).Rows(n).item(1).ToString & " " &
ds.Tables(0).Rows(n).item(2).ToString

or (far slower)

ds.Tables(0).Rows(n).item("FirstName").ToString & " " &
ds.Tables(0).Rows(n).item("LastName").ToString

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
William \(Bill\) Vaughn said:
ds.Tables(0).Rows(n).item(1).ToString & " " &
ds.Tables(0).Rows(n).item(2).ToString

or (far slower)

ds.Tables(0).Rows(n).item("FirstName").ToString & " " &
ds.Tables(0).Rows(n).item("LastName").ToString

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Wahoo, that did the trick! Thanks, Bill!
 
Back
Top