如何通过存储过程将数据表传递到数据库表? [英] How Can I Pass Data Table In To Data Base Table Through stored Procedure?

查看:116
本文介绍了如何通过存储过程将数据表传递到数据库表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我传递command.parameters.addwith value(@ tablename,datatable dt)



显示错误,存储过程中没有这样的参数。插入30000数据。我可以添加吗?

解决方案

参考:

Link1

Link2


似乎没有表参数已被定义SP。请参阅 [< a href =http://stackoverflow.com/questions/5595353/how-to-pass-table-value-parameters-to-stored-procedure-from-net-codetarget =_ blanktitle =新窗口> ^ ]作为样本。


请参考以下链接。

https://msdn.microsoft.com/en-us/library/bb675163(v=vs.90).aspx [ ^ ]



将DataTable发送到存储过程 [ ^ ]



[ ^ ]



http://www.c-sharpcorner.com/uploadfile/pchandraker/passing-table-valued-parameter-to-stored-procedu-part-1/ [ ^

when I pass command.parameters.addwith value("@tablename",datatable dt)

showing error that no such parameter in stored procedure..i ve to insert 30000 datas.how can I add?

解决方案

Refer :
Link1
Link2


Seems like no table parameter has been denfined in the SP. See this[^] as a sample.


Please refer below links .
https://msdn.microsoft.com/en-us/library/bb675163(v=vs.90).aspx[^]

Sending a DataTable to a Stored Procedure[^]

Passing a datatable to a Stored Procedure in SQL Server 2008[^]

http://www.c-sharpcorner.com/uploadfile/pchandraker/passing-table-valued-parameter-to-stored-procedu-part-1/[^]


这篇关于如何通过存储过程将数据表传递到数据库表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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