Solved

Use Row.ItemArray to Check Column Name before accessing

Posted on 2006-11-17
6
700 Views
Last Modified: 2012-05-05
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
Comment
Question by:codequest
  • 4
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
satish_nagdev earned 350 total points
ID: 17976909
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
 
LVL 2

Author Comment

by:codequest
ID: 17981955
Thanks for input.  That looks right (I was just guessing about ItemArray).   I'll try it and post results.
0
 
LVL 2

Author Comment

by:codequest
ID: 18070723
Still waiting to get back to this one...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Author Comment

by:codequest
ID: 18155942
STILL working my way back to this one...
0
 
LVL 2

Author Comment

by:codequest
ID: 18209771
StILL working my way back to this one...
0
 
LVL 4

Expert Comment

by:satish_nagdev
ID: 18289651
let me know when u get back to this :-)

regards,
satish.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now