Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dotqi opened this issue May 11, 2019 · 3 comments
Open

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

dotqi opened this issue May 11, 2019 · 3 comments

Comments

@dotqi
Copy link

dotqi commented May 11, 2019

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

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

@alexbrainman
Copy link
Owner

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

Alex

@dotqi
Copy link
Author

dotqi commented May 17, 2019

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.

谢谢

@alexbrainman
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants