Subject | Re: [IBO] Fetching Query Results...... |
---|---|
Author | Marc Leclerc |
Post date | 2001-03-30T14:54:14Z |
Hi Geoff, I do have a few question if you don't mind.
get the number.
advantages vs open;
lookups tables. calling insert does not set the query to active and when my
loop to open goes through it call open... I though there would not be much
penality to open with param = -1 since there should be no row fetched from
the server.
Thanks
> Your functions make it look like the user (or something) is provding aYes it's called from the mainform which has a read-only query from which I
> company id to the edit/insert procedures. In which case I would do
> something like...
get the number.
>This works, as I can see calling first opens the query ?, is there any
> ...EditExistingCompany(CompanyID: integer): integer;
> begin
> with IB_QueryCompany do
> try
> if not Prepared then
> Prepare;
> ParamByName('C_ID').AsInteger := CompanyID;
> First;
> Edit;
> Result := ShowModal;
> <etc>
>
advantages vs open;
> ...CreateNewCompany(): integer;this actually crashed, since I still have to call OpenDataset to open all
> begin
> with IB_QueryCompany do
> try
> if not Prepared then
> Prepare;
>
> Insert; // notice there is no param assignment
> // you do not need to open a query to insert.
> {$IFDEF _CDS_}
> CBCreateOffice.Visible := True;
> CBCreateOffice.Checked := True;
> {$ENDIF}
> Append;
> Result := ShowModal;
> <etc>
lookups tables. calling insert does not set the query to active and when my
loop to open goes through it call open... I though there would not be much
penality to open with param = -1 since there should be no row fetched from
the server.
Thanks
>
>
> I think the above should work. Does it acheive what you want?
>
>
> Geoff Worboys
> Telesis Computing
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>