Try:
if (dReader.Read())
{
TxtShow.Text = (string) reader["response"];
}
"but in step 2 when my sqlcommand return a value,it's not related to the response column,
so i want access to that value is now ready on the datareader,may you help me how i can access to this data,
thanks dera OriginalGriff"
Yes, it is!
When your issue a SELECT, SQL returns all the rows that match the WHILE statement, but only the columns you specify. So if you have a table with three columns:
Id UserName UserAddress
7 Fred Home
8 Joe Away
9 Bert Holiday cottage
And you issue a SELECT:
SELECT UserName, UserAddress FROM MyTable WHERE Id=8
Then you need to do two accesses to your DataReader to read each of the two columns of the row that you have asked for:
string userName = (string) reader["UserName"];
string userAddr = (string) reader["UserAddress "];
In your case, you are asking for (I assume) a single row (where the national_code is 488) and a single column: response.
Does that make sense? Or are we talking at cross purposes here?