Solved

Use Row.ItemArray to Check Column Name before accessing

Posted on 2006-11-17
6
713 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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