alexbrainman / odbc

odbc driver written in go
BSD 3-Clause "New" or "Revised" License
352 stars 140 forks source link

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

Open dotqi opened 5 years ago

dotqi commented 5 years ago

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

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

alexbrainman commented 5 years ago

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

Alex

dotqi commented 5 years ago

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 commented 5 years ago

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