Subject | Need help with IBOQuery / IBODatabase |
---|---|
Author | paulklomp2002 |
Post date | 2002-08-14T01:04:32Z |
I've just converted a very large application using D6 from BDE to
IBO (Interbase 6). After following ALL of the steps in the
BDEtoIBO conversion help file, I ran into a problem.
The application is an MDI application. On the main MDI form I've
placed an IBODatabase. On a MDI child form I've placed I've
IBOQuerys, Datasources & IBOStoredProc. The IBOQuerys have their
database name linked to the IBODatabase on the main MDI form.
On the MDI child form I've opened up a query in a grid that shows
several records. So far so good!
I have another query on the MDI child form that is opened when you
press a button. The query takes a parameter 'Person_ID' from the
first query and opens that record for editing.
procedure TFrmDoctorEdit.Button2Click(Sender: TObject);
begin
with QryPersonEdit do
begin
Close;
SQL.Clear;
SQL.Add('Select * from person');
SQL.Add('where person_id = :person_id');
Params.ParamValues['Person_ID'] :=
QryPersonListPerson_ID.AsInteger;
RequestLive := true;
Open;
Edit;
end;
end;
The first time that it opens, it works fine. But if you select
another record from the first query it still opens the first record.
I've checked the Person_ID and each time it is changing but the
record returned by the query is always the first record.
Any suggestions would be great!
Thanks,
Paul Klomp
IBO (Interbase 6). After following ALL of the steps in the
BDEtoIBO conversion help file, I ran into a problem.
The application is an MDI application. On the main MDI form I've
placed an IBODatabase. On a MDI child form I've placed I've
IBOQuerys, Datasources & IBOStoredProc. The IBOQuerys have their
database name linked to the IBODatabase on the main MDI form.
On the MDI child form I've opened up a query in a grid that shows
several records. So far so good!
I have another query on the MDI child form that is opened when you
press a button. The query takes a parameter 'Person_ID' from the
first query and opens that record for editing.
procedure TFrmDoctorEdit.Button2Click(Sender: TObject);
begin
with QryPersonEdit do
begin
Close;
SQL.Clear;
SQL.Add('Select * from person');
SQL.Add('where person_id = :person_id');
Params.ParamValues['Person_ID'] :=
QryPersonListPerson_ID.AsInteger;
RequestLive := true;
Open;
Edit;
end;
end;
The first time that it opens, it works fine. But if you select
another record from the first query it still opens the first record.
I've checked the Person_ID and each time it is changing but the
record returned by the query is always the first record.
Any suggestions would be great!
Thanks,
Paul Klomp