2
Answers

return value of sql querry

ta mu

ta mu

11y
756
1
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)