开发者

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? Th开发者_运维技巧is MSDN article mentions that this method is going away, so what should be used instead?

http://msdn.microsoft.com/en-us/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][ODBC SQL Server Driver][SQL Server]The query uses non-ANSI outer join operators ("=" or "="). 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. It is strongly recommended to rewrite the query using ANSI outer join operators (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.

Thanks!

Paul


Swap from using DMO to SMO, the object model exposes the stored procedure parameter collection.

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


Not only this method, but everything DMO that is deprecated since 2005. Use SMO instead:StoredProcedure.Parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜