I NEED LITTLE HELP.
I have values 1000,2000,3000, wich located in numValue.
Now I have sql table CUSTOM1 with column CUSTOM_ID where located numbers 1000,1001,2005,2006 ..
Now if I choose( NumValue == 1000)
go to sql table and find Maximum number wich begin with 1000 and add 1 = Result must be 1002
there is my code
what change I must do in order to receive the num max + 1?
DataTable dt =
SqlConnection con =
new SqlConnection("Data Source=DYS-PC;Initial Catalog=Veolia;Integrated Security=True");
SqlCommand cmd =
new SqlCommand("Select Count(*) "
+ "FROM [MHGROUP].CUSTOM1 " +
"WHERE CUSTOM_ALIAS = '" + comboBox2.Text +
SqlDataAdapter sqlDa2 =
sqlDa2.SelectCommand = cmd;
View Complete Post