Saturday, February 25, 2012

ODBC SPROCS and unnamed parameters

I have a stored procedure outlined below that I access on SQL Server
6.5 via ODBC.
CREATE PROCEDURE usp_SQLREPORTING_TEST @.userid VARCHAR(6) AS
SELECT * INTO #TEMP_CM FROM tblUser WHERE userID LIKE @.userid
SELECT * FROM #TEMP_CM
When I add the data set to SQL reporting services I cannot opt for
command type "Stored procedure" on an ODBC connection , thus I choose
text and execute the dataset with thye following command using a
unnamed parameter.
exec usp_SQLREPORTING_TEST ?
Data is correctly returned when i run the query, BUT I receive no
fields in the data set thus the report never shows anything. A "build"
reveals an error message stating that "the filed in missing from the
returned resultset"
Help!!!!Try clicking the "Refresh Fields" button in Data tab in designer.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ken Shabby" <paul.scott@.klm.com> wrote in message
news:872f3c38.0410060425.3de9c4ce@.posting.google.com...
> I have a stored procedure outlined below that I access on SQL Server
> 6.5 via ODBC.
>
> CREATE PROCEDURE usp_SQLREPORTING_TEST @.userid VARCHAR(6) AS
> SELECT * INTO #TEMP_CM FROM tblUser WHERE userID LIKE @.userid
> SELECT * FROM #TEMP_CM
>
> When I add the data set to SQL reporting services I cannot opt for
> command type "Stored procedure" on an ODBC connection , thus I choose
> text and execute the dataset with thye following command using a
> unnamed parameter.
> exec usp_SQLREPORTING_TEST ?
> Data is correctly returned when i run the query, BUT I receive no
> fields in the data set thus the report never shows anything. A "build"
> reveals an error message stating that "the filed in missing from the
> returned resultset"
> Help!!!!

No comments:

Post a Comment