SQL Server Stored Procedure Update not working with ASP.Net C# GridView RowUpdating

后端 未结 3 452
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-26 02:04

I am having an issue but I am not getting any errors thrown. What\'s happening is that I have a stored procedure that is driving my update but I am unable to get the gridview to

3条回答
  •  不知归路
    2021-01-26 02:30

    Noticed you are in fact pushing the Status value. There's a couple reasons it might not function: 1. The order in which you're calling the parameters is different than the order in which they are defined in the stored proc. Pass status last in your C# code. (in fact, double check all your parameters to make sure they're going in the same order as the proc) 2. The case on "status" is different in your stored proc vs your C# code. Make sure all your input parameters are identical in your C# code to the parameters in the proc.

    The best thing to do, initially, is re-write your proc to do 1 thing and do it well. Once that works, you can re-tool the proc to do more. Though, in line with MarcS, you really oughta refrain from multi-use procs, as maintenance and upkeep on them is a right pain.

提交回复
热议问题