2
Reply

return value of sql querry

ta mu

ta mu

Sep 3 2013 12:54 PM
748
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)