Link to home
Create AccountLog in
Avatar of jdana
jdanaFlag for United States of America

asked on

VB.NET - How do I retrieve a value from a particular column in a DataTable?

Here's a basic question.  What code do I use to retrieve values from a particular column in the data row?  I want to reference the column by column name not by column index.
Dim dstPadlockRow As DataSet
Dim dr As DataRow
Dim ColumnValue As String
      
.... ' omitted code

For Each dr In dstPadlockRow.Tables(0).Rows
   ColumnValue = dr.    <------------- What do I do here?
   .... ' more omitted code
Next

Open in new window

Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of jdana

ASKER

Thanks!