Subject Re: [IBO] TIBOStoredProc - Error
Author Fernando Quartarollo
I'm Sorry.

>>Is it a Select procedure or an Execute procedure?
Select Procedure

>>1) the source code of the procedure

ALTER PROCEDURE EXTCAIXA (
INCAIXA INTEGER,
INDATAI DATE,
INDATAF DATE)
RETURNS (
ONSALDO NUMERIC(18,2),
ONVALOR NUMERIC(18,2),
ODESCRICAO VARCHAR(15),
OCDOC VARCHAR(20),
OCMOV CHAR(3),
ONDATA DATE)
AS
DECLARE VARIABLE NSALDOI NUMERIC(18,2);
begin
/* Procedure Text */
nSaldoI=0;

Select First 1 NovoSaldo
from SaldoDiario
Where CodCaixa=5
and Data<=:INDATAI-1
and CodCaixa=:INCaixa
Order by Data Desc, Hora Desc
Into :NSaldoI;

if (NSaldoI is Null) then
NSaldoI=0;

ONData=INDataI-1;
ODescricao='Saldo Inicial';
ONValor=NSaldoI;
ONSALDO=NSaldoI;

Suspend;

for Select MovFinanceiro.DataBaixa, MovFinanceiro.ValorBaixa,
MovFinanceiro.Mov, MovFinanceiro.Documento,
Empresa.Referencia
from MovFinanceiro
Left Outer Join Empresa On (MovFinanceiro.CodEmpresa=Empresa.Codigo)
Where MovFinanceiro.Baixado='S'
and MovFinanceiro.DataBaixa Between :INDATAI and :INDataF
Order by DataBaixa
into :ONData, :ONValor, :OCMov, :OCDOC, :ODescricao
do begin

if (OCMov='SAI') then
NSaldoI=NSaldoI-ONValor;
else
NSaldoI=NSaldoI+ONValor;

ONSaldo=NSaldoI;


Suspend;

end

end


2) your property settings
All parameters (Input and Output) are in the component, in property
params.
The property prepared is 'True'.
Property StoredProcHasDML is 'True'.
ColumnAttributes is empty.
SessionName is empty.
Ib_Connection is ok.
Ib_Transaction is ok.


3) the code that you use to activate the SP from your application.
The name of component is ExtCaixa.

ExtCaixa.ParamByName('INDataI').AsDateTime:=StrToDate(MskData1.Text);
ExtCaixa.ParamByName('INDataF').AsDateTime:=Date();
ExtCaixa.ParamByName('INCaixa').AsDateTime:=StrToInt(EdtCx.Text);
ExtCaixa.Open;

The application stops here.


Tanks.



Fernando.

----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, November 11, 2003 8:10 PM
Subject: Re: [IBO] TIBOStoredProc - Error


At 02:03 PM 11/11/2003 -0200, you wrote:
>Hi all.
>
>Its first time I write to list.
>I´m Brazilian and my English is not to good, I'm still learning, but I
>will try.
>
>My question is:
>
>I made a Stored Procedure and works very well.
>In my application I put a TIBOStoredProc and when I active the
>TIBOStoredProc give me the message
>'Erro Code 335544327 - Invalid request Handle'.
>Why ?
>I'm using Win98, Firebird 1.0 and Delphi 7.0.

Not enough information.

Is it a Select procedure or an Execute procedure?
Show us
1) the source code of the procedure
2) your property settings
3) the code that you use to activate the SP from your application.

Helen




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/