Hardee Mahoney
2008-05-13 19:02:34 UTC
Hello,
I have a stored procedure that I want to return results to a TSQLDataSet.
When I execute the stored procedure in the TSQLDataSet I get the exception
"Cursor not returned from query".
Here is my stored procedure which I'm pretty sure is the correct syntax -
executes in isql:
CREATE PROCEDURE usp_get_id
RETURNS (Id SMALLINT)
AS
BEGIN
FOR SELECT id, name
FROM cancers
ORDER BY name
INTO :id, :name
DO
BEGIN
SUSPEND;
END
END
Here is my TSQLDataSet:
SDS.SQLConnection := DM.fbConnection;
SDS.CommandType := ctStoredProc;
SDS.CommandText := 'USP_GET_ID';
SDS.Open;
The exception is thrown at the open.
Any help is appreciated.
Thanks
Hardee Mahoney
Washington, DC
I have a stored procedure that I want to return results to a TSQLDataSet.
When I execute the stored procedure in the TSQLDataSet I get the exception
"Cursor not returned from query".
Here is my stored procedure which I'm pretty sure is the correct syntax -
executes in isql:
CREATE PROCEDURE usp_get_id
RETURNS (Id SMALLINT)
AS
BEGIN
FOR SELECT id, name
FROM cancers
ORDER BY name
INTO :id, :name
DO
BEGIN
SUSPEND;
END
END
Here is my TSQLDataSet:
SDS.SQLConnection := DM.fbConnection;
SDS.CommandType := ctStoredProc;
SDS.CommandText := 'USP_GET_ID';
SDS.Open;
The exception is thrown at the open.
Any help is appreciated.
Thanks
Hardee Mahoney
Washington, DC