• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 743
  • Last Modified:

Use Row.ItemArray to Check Column Name before accessing

How might I use DataTable  Row   ".ItemArray" property to check a column name before I attempt

x = MyRow.Item(myColumnNameVariable)

Purpose:  I want to make sure I haven't misspelled the column name when I pass it to this statement using varColumnNameVariable.

Any guidance on this would be appreciated.

Thanks!


0
codequest
Asked:
codequest
  • 4
  • 2
1 Solution
 
satish_nagdevCommented:
hi,
sorry your question is not clear to me but i think you want to get column name from datatable,
you can use dataset.Table[0].Columns[0].ColumnName.

regards,
satish.
0
 
codequestAuthor Commented:
Thanks for input.  That looks right (I was just guessing about ItemArray).   I'll try it and post results.
0
 
codequestAuthor Commented:
Still waiting to get back to this one...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
codequestAuthor Commented:
STILL working my way back to this one...
0
 
codequestAuthor Commented:
StILL working my way back to this one...
0
 
satish_nagdevCommented:
let me know when u get back to this :-)

regards,
satish.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now