You receive an error message when you try to run a stored procedure that has the same name as another stored procedure, but that has a different owner, in SQL Server 2000 Reporting Services (898086)
The information in this article applies to:
- Microsoft SQL Server 2000 Reporting Services
SYMPTOMSIn Microsoft SQL Server 2000 Reporting Services, when you try to run a stored procedure by using the Data view in Report Designer, you receive an error message that is similar to the following: An error occurred while executing the query. Procedure or function yourStoredProcedure has too many arguments
specified. Note The placeholder yourStoredProcedure is a placeholder for the stored procedure that you are trying to run. CAUSEThis problem occurs when two stored procedures have the same name but have different owners. The SqlCommandBuilder.DeriveParameters method in SqlClient returns the parameters of every stored procedure that has the name of the stored procedure that you are trying to run.
Note This problem only occurs when you call stored procedures from the System.Data.SqlClient namespace. This problem does not occur in report projects that are based on the Microsoft OLE DB provider.WORKAROUNDTo work around this problem, in the Data view in Report Designer, change the Command type to Text. Then, run the following query: EXEC <Owner>.<yourStoredProcedure> @parameter1, @parameter2, .
Note The Owner placeholder is a placeholder for the owner of the stored procedure. The following is an example of the command text that is used
to run the CustomerList stored procedure that is owned by user1. EXEC user1.CustomerList @region
The following is an example of a stored procedure. CREATE PROCEDURE CustomerList(@region varchar(15)='BC') as
SELECT * FROM customers WHERE region = @region STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 6/9/2005 |
---|
Keywords: | kbReportWriter kbReport kbtshoot kbnofix kbbug KB898086 kbAudDeveloper |
---|
|