I am having trouble updating information into a form. My saving works fine and retrieving just fine.
I have a store procedure that works this way. If a records exits, update, if it does not exist save a new record.
I tested the store procedure by running it and it works fine if i enter all the variables. If i do not set all variables to Null it wont work. Because of this, on the website i added the following code.
cmd.Parameters.Add(new SqlParameter("@TaskAss1", TaskAss1.Text.Trim()));
cmd.Parameters.Add(new SqlParameter("@TaskAss1", DBNull.Value));
basically to enter null if there is no value on the textbox. Still does not update. I don't know what else do to.
I do not receive any error on the website when i try to update, but i see that the data has not been update.
any suggestion , will be very appreciated