Subject | Re: [IBO] Fetching Query Results...... |
---|---|
Author | Marc Leclerc |
Post date | 2001-03-30T11:13:03Z |
Hi,
Just for mine and others benefit, does calling prepared again (since this is
what I was doing) kind of scrap the parameters pass to it before ? I am
wondering since I was still falling on the right record for editing.
I have not tried the result, I have to wait for Mr. Slow connection to awake
but will get back later.
For Lester, AutoFetchAll was already false.
Thanks
Just for mine and others benefit, does calling prepared again (since this is
what I was doing) kind of scrap the parameters pass to it before ? I am
wondering since I was still falling on the right record for editing.
I have not tried the result, I have to wait for Mr. Slow connection to awake
but will get back later.
For Lester, AutoFetchAll was already false.
Thanks
----- Original Message -----
From: "Svein Erling Tysvær" <svein.erling.tysvaer@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, March 30, 2001 2:43 AM
Subject: Re: [IBO] Fetching Query Results......
> Marc,
>
> Prepare has to be called before setting the parameters, not after. Since
> you use ParamByName, Prepare is called implicitly and you don't have to
> worry about it at all. Change TEditCompanyDlg.OpenDataset to
>
> procedure TEditCompanyDlg.OpenDataset;
> var
> i: integer;
> begin
> for i := 0 to ComponentCount - 1 do
> begin
> if Components[i] is TIB_Query then
> with Components[i] as TIB_Query do
> if not Active then
> begin
> if not Prepared then
> Prepare; //This will not be called for IB_QueryCompany
> Open;
> end;
> end;
> end;
>
> and it ought to work.
>
> Set
>
> At 19:27 29.03.2001 -0500, Marc Leclerc wrote:
> >Now my problem is that when called on a slow link I see a message
> "fetching query results" Row : ... and it fetches the whole dataset.
> >procedure TEditCompanyDlg.OpenDataset;
> >var
> > i: integer;
> >begin
> > for i := 0 to ComponentCount - 1 do
> > begin
> > if Components[i] is TIB_Query then
> > with Components[i] as TIB_Query do
> > if not Active then
> > begin
> > Prepare;
> > Open;
> > end;
> > end;
> >end;
> >
> >function TEditCompanyDlg.EditExistingCompany(CompanyID: integer):
integer;
> >begin
> > Screen.Cursor := crDefault;
> > IB_QueryCompany.ParamByName('C_ID').AsInteger := CompanyID;
> > try
> > OpenDataset;
> >
> >function TEditCompanyDlg.CreateNewCompany(): integer;
> >begin
> > Screen.Cursor := crDefault;
> > IB_QueryCompany.ParamByName('C_ID').AsInteger := -1;
> > try
> > OpenDataset;
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>