-
Temp.Table results from Stored Procedure into rs
Hi,
I was wondering if any of you out there can help me out please...
I have a stored procedure which comprises of a UNION of two SELECT statements
storing the results into a temporary table (#Table)...
Using ADO I call the stored procedure passing the results into into a recordset.
Until now using normal SELECT statements in my Stored procedures I've had
no problems. Using the more involved SELECT/Temp table use, Ive struck a
problem. I now get the message
"Operation is not allowed when object is closed"
Now I've tested the exact code switching the Stored Procedure name with
a stored procedure used previously and it works fine. I went back to the
problem stored procedure and removed the line :
DROP Table #Table ..thinking its dropped the results before sending it to
the recordset...to no avail..
My VB referring to the stored procedure call is as follows :
adoCommand.CommandText = "StoredProcedure"
adoCommand.Commandtype = adCmdStoredProc
adoCommand.Name = "MultipleResults"
Set adoCommand.ActiveConnection = adoGlobalConn
adoGlobalConn.MultipleResults rstGlobal
do while not rstglobal.eof <----- error Above given here
(My record set is Static, LockBatchOptimistic....)
Any assistance would be much appreciated.
Many Thanks in Advance,
Gavin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks