我如何调用存储过程 [英] How do I call store procedure

查看:84
本文介绍了我如何调用存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我解决一下......



i我在 ruby​​ 工作,商店程序包含以下代码.... < br $> b $ b

call_stored_proc_verb =exec

name =dbo.SpData

args = 1

sql =#{call_stored_proc_verb}#{name}#{args}

results = ActiveRecord :: Base.connection.execute(sql)

<当我从命令提示符处调用它时,问题是相同的...

没有与sqlserver连接的问题但是



当我调用我的商店程序时,它会反叛-1而不是数据..

please help me to solve it...

i am working in ruby with store procedure with following code....

call_stored_proc_verb="exec"
name="dbo.SpData"
args=1
sql = "#{call_stored_proc_verb} #{name} #{args}"
results=ActiveRecord::Base.connection.execute(sql)


problem is same when i call it from command prompt...
there is no problem of connection with sqlserver but

when i call my store procedure it ruturns -1 instead of data...

推荐答案

这篇关于我如何调用存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆