ta mu

ta mu

  • NA
  • 201
  • 81.8k

return value of sql querry

Sep 3 2013 12:54 PM
SqlCommand cmd = new SqlCommand("SELECT (MAX[Account_No] + 1) FROM addcustomer ", my);
          
            cmd.ExecuteScalar();
             int result = ((int)cmd.ExecuteScalar());
             textBox1.Text =Convert.ToString( result);

i want to save the return value of this query in a integer like abve but nothing displayed on textbox.

 
 

Answers (2)