Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Temporary Tables

Status
Not open for further replies.

sheridan101

Programmer
Dec 31, 2003
29
US
I am using:
Crystal Reports.NET
a custom designed report viewer written in C#
SQL Server 2000
ODBC DSN connection
Windows 2K

I am trying to generate a temporary table of data within a stored procedure. Upon completion of the stored procedure, I am dumping the temporary data out (SELECT * FROM #TempPlay) as the result dataset, to be returned to a crystal report.

However, every time I run the report, I get an exception "Failed to load rowset". If I cut the queries and paste them to SQL Query analyzer and run, Query analyzer lists many rows of data.

Will Crystal Reports work with SQL Server temporary tables (i.e. #TempPlay) or will I have to "(re)create" a "real" database table, to be used as a temporary table, and dump the data into it. Then require that only one copy of the report be running at the same time (there is currently a possibility that the reporting package could be installed on several stations, any one of which could run the reports at any time).
 
One common mistake is not using the SET NOCOUNT ON in the SP.

A temp table should work.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top