将多行传递到存储过程 [英] Passing multiple rows to a Stored procedures
本文介绍了将多行传递到存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何在sql 2005中创建一个存储过程,该存储过程接受多行,读取并在表中插入值.
而且,我们如何在vs.net 2008中调用该过程?
How can we create a stored procedure in sql 2005 which accepts multiple rows, reads and inserts values in a table.
And, How can we call that procedure in vs.net 2008?
推荐答案
在 ^ ]应该可以帮助您.
http://support.microsoft.com/kb/555266 [
The approach discussed at Passing an array or DataTable into a stored procedure[^] should help you out.
http://support.microsoft.com/kb/555266[^] might give you some ideas as well.
请按照以下文章进行查询
在SP中传递多行
从c#中执行SP
希望对您有帮助,
谢谢
-amit.
Hi,
please follow below articles for your query
Passing Multiple row in SP
Execute SP from c#
hope this will help you,
thanks
-amit.
您需要用户定义的表类型:
http://msdn.microsoft.com/en-us/library/bb522526.aspx [ ^ ]
它的用法是这样的:
http://msdn.microsoft.com/en-us/library/bb510489.aspx [ ^ ]
希望对您有所帮助.
You need user defined table types :
http://msdn.microsoft.com/en-us/library/bb522526.aspx[^]
And its usage is this :
http://msdn.microsoft.com/en-us/library/bb510489.aspx[^]
Hope it helps.
这篇关于将多行传递到存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文