如何了解奎里酒 [英] how come to know about querry
本文介绍了如何了解奎里酒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
我让Querry从数据库中删除
该值是delete,但我如何知道成功执行Querry的天气.
hi to all!
i make querry to delete from database
the value is delete but how i come to know that weather that querry is executed successfully. what condition i have to make to check.
推荐答案
RecordsAffected
可能就是您要查找的内容 ^ ].
The RecordsAffected
is probably what you are looking for[^].
请参见下文,
SqlCommand.ExecuteNonQuery方法 [在ExecuteNonQuery方法中使用DELETE命令的示例 [
Please see below,
SqlCommand.ExecuteNonQuery Method[^]
Or you could also see this page,
Example of using a DELETE command with ExecuteNonQuery method[^]
Hope it helps :)
如果您使用的是存储过程,则可以在delete语句后使用以下代码.
If you are using Stored Procedure, you can use the below code after the delete statement.
IF @@ERROR = 0 BEGIN
SET @out_put = 'SUCCESS'
END
ELSE BEGIN
SET @out_put = 'ERROR'
END
@out_put
是输出参数.
@out_put
is the output parameter.
这篇关于如何了解奎里酒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文