简体   繁体   English

SQL Server 2008 SQL-DMO中StoredProcedure对象上的SQL Server EnumParameters方法

[英]SQL Server EnumParameters Method on StoredProcedure object in SQL Server 2008 SQL-DMO

Hello all you wonderfully helpful people, 大家好,您好,乐于助人的人,

What is the alternative to EnumParameters in SQL Server 2008? SQL Server 2008中EnumParameters的替代方法是什么? This MSDN article mentions that this method is going away, so what should be used instead? 这篇MSDN文章提到此方法已不复存在,那么应该使用什么代替呢?

http://msdn.microsoft.com/en-us/library/ms133474(SQL.90).aspx http://msdn.microsoft.com/zh-CN/library/ms133474(SQL.90).aspx

Here is the error we receive when attempting to use this method: 这是我们在尝试使用此方法时收到的错误:

Microsoft SQL-DMO (ODBC SQLState: 42000) error '800a1033' Microsoft SQL-DMO(ODBC SQLState:42000)错误'800a1033'

[Microsoft][ODBC SQL Server Driver][SQL Server]The query uses non-ANSI outer join operators (" =" or "= "). [Microsoft] [ODBC SQL Server驱动程序] [SQL Server]查询使用非ANSI外部联接运算符(“ =”或“ = ”)。 To run this query without modification, please set the compatibility level for current database to 80, using the SET COMPATIBILITY_LEVEL option of ALTER DATABASE. 要不加修改地运行此查询,请使用ALTER DATABASE的SET COMPATIBILITY_LEVEL选项将当前数据库的兼容性级别设置为80。 It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). 强烈建议使用ANSI外部联接运算符(LEFT OUTER JOIN,RIGHT OUTER JOIN)重写查询。 In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes. 在SQL Server的将来版本中,即使在向后兼容模式下也将不支持非ANSI连接运算符。

Thanks! 谢谢!

Paul 保罗

Swap from using DMO to SMO, the object model exposes the stored procedure parameter collection. 从使用DMO到SMO的交换,对象模型公开了存储过程参数集合。

http://msdn.microsoft.com/en-us/library/ms162209(SQL.90).aspx http://msdn.microsoft.com/zh-CN/library/ms162209(SQL.90).aspx

不仅是此方法,还包括自2005年以来不推荐使用的所有DMO。请改用SMOStoredProcedure.Parameters

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM