views:

88

answers:

2

Hello all you wonderfully helpful people,

What is the alternative to EnumParameters in SQL Server 2008? This MSDN article mentions that this method is going away, so what should be used instead?

http://msdn.microsoft.com/en-us/library/ms133474%28SQL.90%29.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

+2  A: 

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

http://msdn.microsoft.com/en-us/library/ms162209%28SQL.90%29.aspx

Andrew
+1  A: 

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

Remus Rusanu