|
发表于 2022-1-24 16:12:28
|
显示全部楼层
广东省云浮市
ALTER PROCEDURE [dbo].[10_新增用户] @names nvarchar(30),@users nvarchar(30),@pass_ nvarchar(30)
AS
BEGIN
declare @sql1 nvarchar(500),@err_count int
set @err_count=0
begin
set @sql1='insert into users (names,users,pass_) values ('''+@names+''','''+@users+''','''+@pass_+''')'
execute sp_executesql @sql1
set @err_count=@err_count+@@ERROR
--select 'ok' as a
end
if @err_count=0
select (select 'ok' as results for json path,include_null_values,root('column":["results"],"data')
) as t1
else
select (select 'error' as results for json path,include_null_values,root('column":["results"],"data')
) as t1
END
--exec [10_新增用户] 'dfdfgdfg','dfgsadg','dfgseg'
--delete from users where names='dfdfgdfg'
--select * from users where names='dfdfgdfg'
上面是我数据库中的一个存储过程,我测试了黑月\原野等各位大佬的ADO模块,全部报错,或者得不到返回结果,唯有吴涛大佬的支持库版本可以正常调用,也不知道是我的写法还是什么原因 |
|