I was sitting an a problem last night and couldn't find a solution so I help you can help me now : P I'm using the Insert Comand from the Sql Data Source to write to a Database.The problem is that the Parameters are always NULL.
I can't find a way to cancel the update the update without closing the row from the edit event.Hello, I have a Grid View based on a Sql Data Source.There is a field "num", which is the primary key of the underlying table.USE [Adventure Works] GO /****** Object: Stored Procedure [Human Resources].[Update Employee Gender] Script Date: 04/08/2011 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: -- ============================================= CREATE PROCEDURE [Human Resources].[Update Employee Gender] @Employee ID [int], @Gender [nchar](1) AS BEGIN UPDATE [Human Resources].[Employee] SET [Gender] = @Gender WHERE [Employee ID] = @Employee ID; END GO 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) Is there any specific reason that column to be identified as User Id in the code?
Odbc providers associate the parameters in the collection according to the order that the parameters appear in the parameterized SQL query.