关于return问题?

small_pig 2004-01-09 02:55:48
create procedure sp_DeleteVoucher
@VoucherID int
as
declare @Checked bit, @Posted bit, @ImmPosted bit
declare @rc int
select @Checked = FChecked, @Posted = FPosted
from t_Voucher where FVoucherID = @VoucherID
if @@rowcount = 0
return 0x80044041 -- EBS_E_ObjectNotFound
-- Cannot delete checked or posted voucher
if @Checked = 1
return 0x8004410B -- EBSGL_E_VoucherChecked
if @Posted = 1
return 0x8004410E -- EBSGL_E_VoucherPosted
-- Delete the voucher
delete from t_VoucherEntry where FVoucherID = @VoucherID
delete from t_Voucher where FVoucherID = @VoucherID
return 0
GO

问题一:当执行return 0x80044041 的后,程序还会执行以后的语句么。
问题二:return 0x80044041 如何能在程序中得到他们那
问题三:0x80044041,0x8004410B,0x8004410E是什么错误阿
...全文
52 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
nswhy 2004-09-27
  • 打赏
  • 举报
回复
ding
txlicenhe 2004-01-09
  • 打赏
  • 举报
回复
1: 不会执行
2:
declare @a int
exec @a = sp_DeleteVoucher 参数
select @a
3: 不知道

34,594

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧