本文介绍了存储过程中的经典ADO和表值参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过经典的ADO将表值参数传递给SQL Server中的存储过程?
Is there some way to pass a table-valued parameter to a stored procedure in SQL Server via classic ADO?
推荐答案我以为它们是2008年的新事物?
I thought they were new in 2008?
无论如何,我认为答案是否定的,我怀疑是否有DataTypeEnum值可以转换为您的需求。
Anyway, I think the answer is going to be no, I doubt there's a DataTypeEnum value that you'll be able to bend to your needs.
因此,如果我建议使用其他方法,我想您想做的就是将某种结构化数据传递到存储过程中。我以前在ADO中使用XML进行过此操作:
So if I may suggest an alternative, I guess what you want to do is pass some sort of structured data into the stored procedure. I have done this before in ADO using XML:
- 在存储的proc中将参数定义为xml
- 在ADO中将参数定义为adLongVarChar类型,长度为len(xml)+ 1
我知道这不是你想要的,但这是一种有效的方法
I know it's not what you wanted, but it's a method that works
更多推荐
存储过程中的经典ADO和表值参数
发布评论