存储过程中的经典 ADO 和表值参数

编程入门 行业动态 更新时间:2024-10-12 05:52:06
本文介绍了存储过程中的经典 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:

  • 将存储过程中的参数定义为xml类型
  • 将 ADO 中的参数定义为类型 adLongVarChar,长度 = len(xml) + 1

我知道这不是您想要的,但这是一种有效的方法

I know it's not what you wanted, but it's a method that works

更多推荐

存储过程中的经典 ADO 和表值参数

本文发布于:2023-11-09 04:15:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571378.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:过程中   参数   经典   ADO

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!