I'll try to address your question, but I'm also going through some of the other problems here.
Without seeing your markup, it's hard for me to tell if you've created .
Last Change: More Information (@jwiscarson) I’m sorry, I was in hurry. In that project, the users could select 2 categories, enter a search string and the result will show in a Grid View. Here is my problem, if the "admin user" click on edit, change the value of the cell and execute the update, the value would not changed in the Hoo boy.
You didn't ask this in your question, but you've written some smelly code here.
If not, this should resolve your problem right, protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) Is there any specific reason that column to be identified as User Id in the code?
If not, this should resolve your problem right, protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) ALTER PROCEDURE [Human Resources].[usp Update Employee Gender] @Employee ID1 [int], @Gender [nchar](1) AS BEGIN UPDATE [Human Resources].[Employee] SET [Gender] = @Gender WHERE [Employee ID] = @Employee ID1; END Hi, Even I got the same error when I changed Employee Id to Employee ID1, but I solved this in different way.
Data Bind() on Page Load, in Edit mode it restored original values of parameters.
Hey, I am currently having issues using the sqldatasource automatically generated update and insert command, when I have a Bit field, otherwise it works fine for any other table...
here is the code: ASPX: " Delete Command="DELETE FROM [Students] WHERE [ID] = @ID" Insert Command="INSERT INTO [Students] ([ID], [User Name], [Passed], [Student ID]) VALUES (@ID, @User_Name, @Passed, @Student_ID)" Select Command="SELECT * FROM [Students]" Update Command="UPDATE [Students] SET [User Name] = @User_Name, [Passed] = @Passed, [Student ID] = @Student_ID WHERE [ID] = @ID" Can you run SQL Profiler and see, what command exactly you're trying to execute when you edit a record? Also, could it be because of a space in the field names?Although this isn't as big of a problem when you're referencing the text from web controls, getting in the habit now will prevent you from serious headaches and inefficiently checking for null and empty later. NET 4.0, you should have access to event, you need to pull the new values out of the front-end controls, and then re-bind your data.It looks like your source code is pretty close to the MSDN source code here.Hi When you Configure Sql Data Source ,you must select Coulmns of tables in Right page there is Advanced Button.click it And Tick Generete Insert, Update And Delete Statements.click ok with this work you are able to Delete and Edit Rows of Grid View . Interesting enough, after using the new driver I can generate the queries, however I get the message "invalid character" which I believe is the same problem I was having before when not using quotes (my pk field is a varchar).