Subject | Problem with TIBOQuery |
---|---|
Author | Helton de Oliveira |
Post date | 2001-12-20T10:57:18Z |
Hi,
I'm porting a BDE application to IBO using the TIBO components and i'm
having problems with a TIBOQuery with a SmallInt parameter called "MES".
The TIBOQuery didn't find any data. It seems not respect the parameter since
there is data in the table especified on the Select clause which conforms
with "MES=12".
Here is the select clause: "SELECT * FROM VctosDescs WHERE Mes = :Mes ORDER
BY Mes, CodVctoDesc"
Here is the BeforeOpen event of the TIBOQuery:
procedure TdtmTables.qryVctDscBeforeOpen(DataSet: TDataSet);
begin
qryVctDsc.ParamByName('Mes').AsInteger := 12;
end;
Here is the AfterOpen event of the TIBOQuery:
procedure TdtmTables.qryVctDscAfterOpen(DataSet: TDataSet);
begin
if (qryVctDsc.BOF and qryVctDsc.EOF) then DoSomething;
qryVctDsc.First;
end;
The if in the AfterOpen always returns true even if there is data on the
table which conforms with the MES parameter.
What could be hapening ?
Helton
I'm porting a BDE application to IBO using the TIBO components and i'm
having problems with a TIBOQuery with a SmallInt parameter called "MES".
The TIBOQuery didn't find any data. It seems not respect the parameter since
there is data in the table especified on the Select clause which conforms
with "MES=12".
Here is the select clause: "SELECT * FROM VctosDescs WHERE Mes = :Mes ORDER
BY Mes, CodVctoDesc"
Here is the BeforeOpen event of the TIBOQuery:
procedure TdtmTables.qryVctDscBeforeOpen(DataSet: TDataSet);
begin
qryVctDsc.ParamByName('Mes').AsInteger := 12;
end;
Here is the AfterOpen event of the TIBOQuery:
procedure TdtmTables.qryVctDscAfterOpen(DataSet: TDataSet);
begin
if (qryVctDsc.BOF and qryVctDsc.EOF) then DoSomething;
qryVctDsc.First;
end;
The if in the AfterOpen always returns true even if there is data on the
table which conforms with the MES parameter.
What could be hapening ?
Helton