开发者

Cursor not returned from Query

开发者 https://www.devze.com 2023-04-01 00:14 出处:网络
I\'m usingDelphi XE and FireBird 2.5. Try use a TSQLStoredProc and give me the error \"Cursor not returned from Query\" when I put the Active property to TRUE.

I'm using Delphi XE and FireBird 2.5.

Try use a TSQLStoredProc and give me the error "Cursor not returned from Query" when I put the Active property to TRUE.

An dummy example of storedproc

CREATE PROCEDU开发者_运维问答RE NEW_PROCEDURE
RETURNS(
  RDO SMALLINT)
AS
BEGIN
  Rdo = 5; 
  /* Procedure body */
  SUSPEND;
END;


As a workaround, a query like SELECT * FROM NEW_PROCEDURE should work (using TSQLQuery).


I think you are supposed to use the ExecProc method instead of Open / Active. Setting Active to true should only be used if your SQL Statement returns a ResultSet (a set of records), which yours doesn't.

Regards,

Stefaan

0

精彩评论

暂无评论...
验证码 换一张
取 消