Query by a column name

462
2
08-24-2011 06:59 AM
JoannaLaroussi
New Contributor
I would like to write a simple and fast query, which will check that my feature class has a column with a name the same as text entered by the user. For now I hard coded it in a following way:

if (InputPED.Text == "S_56" || InputPED.Text == "S_87")
{
MessageBox.Show("my message about update");
strQueryTaskURL = _strSupPED;
break;
}

else
{
//do other tasks
}

I am expecting to have much more updates and I prefer to update service not a code. I am looking for a way of changing hard coded values in my code to logic, which will check that my feature class has already a column with a name ???S_56??? or any other entered by a user.
0 Kudos
2 Replies
BernardNtiamoah
New Contributor
I don't really understand what you're trying to do..sorry. But i would suggest that if you have featurelayer, you can access its fields through layerinfo property.
0 Kudos
JoannaLaroussi
New Contributor
Thanks! Feature layer worked.
0 Kudos