Subject | Prepare causes EAcessViolation... |
---|---|
Author | Eduardo Jedliczka |
Post date | 2002-10-18T12:26:19Z |
Borland Delphi 6, FireBird 1.0.821, IBO 4.2Hh
I have a report query! I use that in all reports im my project. I clear the
IB_Query and construct the select, prepare, pass parameters, use the data,
unprepare, close, and clear again... All time it´s perfect. But some days
ago, I have a little trouble:
This (below) Query show a wrong quantity of parameters. ( It works for more
than 4 months... but not work more! ).
Select CodConta,Reduzido,Nome,
(Select Sum(Valor) From Co_Lct where Debito= P.Reduzido and
Data<:DataInicial and CodFilial>=0 and CodEmpresa=:CodEmpresa ) as
DebitoAnterior,
(Select Sum(Valor) From Co_Lct where Credito=P.Reduzido And
Data<:DataInicial and CodFilial>=0 and CodEmpresa=:CodEmpresa ) as
CreditoAnterior,
(Select Sum(Valor) From Co_Lct where Debito=P.Reduzido and
Data>=:DataInicial and Data<=:DataFinal and CodFilial>=0 and
CodEmpresa=:CodEmpresa ) as DebitoPeriodo,
(Select Sum(Valor) From Co_Lct where Credito=P.Reduzido and
Data>=:DataInicial and Data<=:DataFinal and CodFilial>=0 and
CodEmpresa=:CodEmpresa ) as CreditoPeriodo
From Co_Pct P
Where NumPlano=:NumPlano and (CodConta starting with :BuscaConta1)
Order By 1
Found only NumPlano and BuscaConta1 parameters, all others parameters are
not found!
I change the status of:
KeyLinks.Clear;
KeyLinksAutoDefine := false;
FetchWoleRows := false;
And when I do :
If not Qy_Report.Prepared then
Qy_report.Prepare; <<<<< EAcessViolation in xxxx.exe addres
ffff:ffffff...
Any Idea ???
==============================
Eduardo Jedliczka
GeraSoft Informática
Apucarana - PR - Brasil
==============================
I have a report query! I use that in all reports im my project. I clear the
IB_Query and construct the select, prepare, pass parameters, use the data,
unprepare, close, and clear again... All time it´s perfect. But some days
ago, I have a little trouble:
This (below) Query show a wrong quantity of parameters. ( It works for more
than 4 months... but not work more! ).
Select CodConta,Reduzido,Nome,
(Select Sum(Valor) From Co_Lct where Debito= P.Reduzido and
Data<:DataInicial and CodFilial>=0 and CodEmpresa=:CodEmpresa ) as
DebitoAnterior,
(Select Sum(Valor) From Co_Lct where Credito=P.Reduzido And
Data<:DataInicial and CodFilial>=0 and CodEmpresa=:CodEmpresa ) as
CreditoAnterior,
(Select Sum(Valor) From Co_Lct where Debito=P.Reduzido and
Data>=:DataInicial and Data<=:DataFinal and CodFilial>=0 and
CodEmpresa=:CodEmpresa ) as DebitoPeriodo,
(Select Sum(Valor) From Co_Lct where Credito=P.Reduzido and
Data>=:DataInicial and Data<=:DataFinal and CodFilial>=0 and
CodEmpresa=:CodEmpresa ) as CreditoPeriodo
From Co_Pct P
Where NumPlano=:NumPlano and (CodConta starting with :BuscaConta1)
Order By 1
Found only NumPlano and BuscaConta1 parameters, all others parameters are
not found!
I change the status of:
KeyLinks.Clear;
KeyLinksAutoDefine := false;
FetchWoleRows := false;
And when I do :
If not Qy_Report.Prepared then
Qy_report.Prepare; <<<<< EAcessViolation in xxxx.exe addres
ffff:ffffff...
Any Idea ???
==============================
Eduardo Jedliczka
GeraSoft Informática
Apucarana - PR - Brasil
==============================