Classic ADO and Table-Valued Parameters in Stored Procedure(存储过程中的经典 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 和表值参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:存储过程中的经典 ADO 和表值参数
基础教程推荐
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
