|
-
May 16th, 2005, 12:26 AM
#1
Temp Table In MSSQL Server 2000 And ADO
Dear All,
I have a problem with Temp Table and ADO. I use MSSQL Server 2000 and ADO 2.6 with Visual Basic 6.0
1. --> I Create Stored Procedure as follows
CREATE PROCEDURE sp_GetData()
AS
CREATE TABLE #T1(ItemCode char(15) NOT NULL PRIMARY KEY,
QTY_RSVD bigint,
QTY_AVBL bigint)
-- I INSERT SOME DATA FROM Various Tables to Table #T1
SELECT * FROM #T1
GO
-- END OF STORED PROCEDURE
2. --> Try to open above stored procedure with ADO, IT was not successfull
I need to know Is It possible to get the out put of the stored procedure to a ado recordset?
If it is possible please help me to do It.
Thank you,
Dinesh
--
web : http://www.freewebs.com/dineshns
-
May 17th, 2005, 12:19 AM
#2
Re: Temp Table In MSSQL Server 2000 And ADO
I think you need to set at the start of your stored proc:
Code:
SET NOCOUNT ON
SET ANSI_WARNINGS OFF
And then at the end, after your SELECT from the temp table
Code:
SET NOCOUNT OFF
SET ANSI_WARNINGS ON
It works for me then.
Extreme situations require extreme measures
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
|
Click Here to Expand Forum to Full Width
|