odbc icon indicating copy to clipboard operation
odbc copied to clipboard

不能正确返回存储过程的错误

Open dotqi opened this issue 5 years ago • 3 comments

ALTER PROCEDURE [dbo].[lP_Date] @FDate varchar(200) AS BEGIN select 1 as fid RAISERROR('不能删除已经审核的单据!',18,18) END

当存储过程有一个SELECT 执行成功后db.Exec,不能返回错误。

dotqi avatar May 11 '19 06:05 dotqi

Sorry but I only understand English. I cannot help without understanding your question.

Alex

alexbrainman avatar May 11 '19 07:05 alexbrainman

Failure to return stored procedure correctly

The following stored procedures:

ALTER PROCEDURE [dbo]. [lP_Date]

@ fdate varchar (200)

AS

BEGIN

Select 1 as FID

RAISERROR ('Can't Delete Audited Documents!', 18, 18)

END

---===================

When a stored procedure has a successful SELECT execution, db. Exec cannot return a RAISERROR error.

谢谢

dotqi avatar May 17 '19 05:05 dotqi

I still do not understand. What do you want to do?

Maybe provide small Go program that demonstrates your problem. Show what your program outputs, and explain why you think your program output is wrong.

Thank you.

Alex

alexbrainman avatar May 18 '19 08:05 alexbrainman