ACC2000: Stored Procedure with Output Parameter Doesn't Return DataID: Q225948
|
When you try to run a stored procedure that uses an output parameter to return data from within a Microsoft Access project (.adp), you are prompted for any input parameter(s) as well as the ouput parameter. After you enter the parameter(s), you receive the following message:
The Stored Procedure executed successfully but did not return records.
To run a stored procedure that contains output parameters from within an Access project, create a second stored procedure that nests the original procedure. Then you can run the new stored procedure instead. The following example demonstrates how to implement this technique:
CREATE PROCEDURE OutputSqrrt
(
/* Input Parameter used to prompt user for value */
@EnterValue int
)
AS
/* variable used to return the result */
Declare @OutputResult int
/* Call First Stored Procedure, storing the result in @OutputResult */
Execute Sqroot @EnterValue, @OutputResult OUTPUT
SELECT @OutputResult as long
CREATE PROCEDURE Sqroot
(
@EnterValue int,
@Result int OUTPUT
)
AS
SELECT @Result = SQRT(@EnterValue)
The Stored Procedure executed successfully but did not return records.
Additional query words: pra prb
Keywords : kbdta AccessCS
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 20, 1999