I have a form that is being populated with data from a sql table. The user can update via textboxes information on the form and click update. The data should then be updated back to the table.
For some reason, When I add the parameters I need for the query, it is not grabbing the update from my textbox, it is showing the value that was populated upon load. I tried to change the customer's phone number. When I run my code it is pulling in the original phone number and not picking up my change. Any ideas??
Here is my code:
string sql = "UPDATE Customer SET FirstName=@FirstName, LastName=@LastName, Email=@Email, Password=@Password, Address1=@Address1, Address2=@Address2, City=@City, State=@State, Zip=@Zip, Phone=@Phone, Fax=@Fax Where CustomerID=@CustomerID";
//Declare the Command
SqlCommand cmd = new SqlCommand(sql, Conn);
//Add the parameters needed for the SQL query
View Complete Post