Wednesday, October 15, 2014

ExecuteScalar()

Problem face

In my case,I created the Cascading dropdown, the third dropdown want to change to textbox.

Definition:

Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

The sample of coding ExecuteScalar();

 var result = cmd.ExecuteScalar();
            if (result != null)
            {
                TimeDrop.Text = result.ToString();
            }





No comments:

Post a Comment