在 DataGridView 中删除一条记录 [英] Delete a record in DataGridView
本文介绍了在 DataGridView 中删除一条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试删除 DataGridView 中的记录,但它给了我这个错误:
I'm trying to delete a record in DataGridView but it is giving me this error:
必须声明标量变量@reg_id".
Must declare the scalar variable "@reg_id".
我的 reg_id 是表中的主键列.我该如何解决?
My reg_id is the primary key column in the table. How can I resolve this?
推荐答案
您必须在声明此参数的存储过程中为 @reg_id 提供默认值.
You have to give default value to @reg_id in stored procedure where you declare this parameter.
like @reg_id = NULL or @reg_id = ' '
这篇关于在 DataGridView 中删除一条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文