p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Showing result in MSDE(Access) using StoredProc


Message #1 by "yuenkit" <janet_smith2000@y...> on Fri, 29 Jun 2001 02:41:47
I have come across some problem when i using MSDE (Access2000)

When i type the following statement in StoredProcedure,

a message "The stored procedure executed successfully but did not return 

records"



CREATE Procedure StoredProcedure1

As



CREATE TABLE #tblNew

(

	Row int IDENTITY(1,1) PRIMARY KEY,

	Project varchar(100),

	Buyer int,

	Quantity int,

	TotalCost money

)



INSERT INTO #tblNew

SELECT Project, Buyer, Quantity, TotalCost

FROM tblRecord;



SELECT * 

FROM tblRecord



DROP TABLE #tblNew



If i remove the 'INSERT' lines, the storedproc works well(return records).



CREATE Procedure StoredProcedure1

As



CREATE TABLE #tblNew

(

	Row int IDENTITY(1,1) PRIMARY KEY,

	Project varchar(100),

	Buyer int,

	Quantity int,

	TotalCost money

)



INSERT INTO #tblNew

SELECT Project, Buyer, Quantity, TotalCost

FROM tblRecord;



SELECT * 

FROM tblRecord



DROP TABLE #tblNew



i've search the solution to this matter at MS website

http://support.microsoft.com/support/kb/articles/Q225/9/48.ASP?LN=EN-

US&SD=gn&FR=0&qry=The%20Stored%20Procedure%20executed%20successfully%20but%

20did%20not%20return%20records&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000



but it's just provide solution to return output parameter, and it's do 

nothing with recordset.





Thanks for answering my question!


  Return to Index