Subject Re: [IBO] TIBOQuery and selectable SP
Author Ronan van Riet
Thanks for your help Lucas! But the Problem is still there here.

> the error message is 'Invalid request handle'.


Here is my TIBQuery definition:

object IBO_QRY_MY_PROJECT: TIBOQuery
Params = <>
DatabaseName = 'D:\Firebird\eSolutions\ESOLUTIONS.FDB'
IB_Connection = cnMain
IB_Transaction = tnMain
RecordCountAccurate = True
DataSource = dsGET_MY_PROJECTS
SQL.Strings = (
'SELECT o_ROW_ID, o_created,'
' o_last_upd,'
' o_projecttype, o_desc_text, o_stage, o_Calcdate'
'FROM SP_GET_MY_PROJECTS')
FieldOptions = []
Left = 720
Top = 136
end

Here is my sp

CREATE PROCEDURE SP_GET_MY_PROJECTS
RETURNS (
O_ROW_ID INTEGER,
O_CREATED DATE,
O_LAST_UPD DATE,
O_PROJECTTYPE VARCHAR(30),
O_DESC_TEXT VARCHAR(10),
O_STAGE INTEGER,
O_CALCDATE INTEGER)
AS
begin
FOR
SELECT prj.ROW_ID row_id, prj.created,
prj.last_upd,
prj.projecttype, prj.desc_text, prj.stage, prj.calcdate
FROM E_PROJECT prj
into :o_ROW_ID, :o_created,
:o_last_upd,
:o_projecttype, :o_desc_text, :o_stage, :o_Calcdate
DO BEGIN
SUSPEND;
END
end

Here is how I open the query

procedure TDataModule2.waGET_MY_PROJECTSExecute(Sender: TObject);
begin
with IBO_QRY_MY_PROJECT do begin
if not prepared then prepare;

IBO_QRY_MY_PROJECT.RequestLive := true;
IBO_QRY_MY_PROJECT.Open;
end;
end;

Ronan van Riet