Hello guys I have got this SqlDataAdapter which finds the highest value:
DataTable dt = new DataTable();
SqlDataAdapter SDA = new SqlDataAdapter("Select MAX (ID_K) FROM klient", spojeni);
SDA.Fill(dt);
spojeni.Close();
If it selects I need its result add +1 and insert it as object value into this parameter.
prikaz2.Parameters.AddWithValue("@val4", ); // here should be SDA +1
I tried to insert to object value whole SqlDataAdapter but it was nonsense. Is there any way to achieve that?
Thanks in advance
SELECT ...andExecuteNonQuery?