Hello guys I have got this code:
SqlCommand scom = new SqlCommand(
\"INSERT INTO klient(name,surname)
You haven't executed the command.
prikaz.ExecuteNonQuery();
Missing the ExecuteNonQuery call
SqlCommand prikaz = new SqlCommand("INSERT INTO klient(name,surname) values(@kname,@ksurname)", spojeni);
prikaz.Parameters.AddWithValue("@kname", kname.Text);
prikaz.Parameters.AddWithValue("@ksurname", ksurname.Text);
spojeni.Open();
prikaz.ExecuteNonQuery();
......
A command should be executed to update the database...
The above stated problem is due to the missing executenonquery() statement, add this statement in your code
spojeni.Open();
prikaz.ExecuteNonQuery();