Subject Re: [IBO] Re: How to duplicate a row from edit state into append/insert state?
Author G. Nau
Am 14 Mar 2006 um 14:36 hat tibotaka geschrieben:

> In my opinion "normal" process flow is BROWSE -> APPEND/INSERT or EDIT
> -> POST/CANCEL -> APPEND/INSERT...
>
> You can try something like this:
>
> procedure TForm1.Button2Click(Sender: TObject);
> var
> SpareRowValues: Variant;
> begin
> SpareRowValues :=
> ib_query1['NAME;ADDRESS;ZIP;CITY_NAME;...;STATE_NAME'];
>
> {'NAME;ADDRESS;ZIP;CITY_NAME;...;STATE_NAME' is list (delimited with
> ;) of fields you want to copy to new record}
>
>
> ib_query1.append;
> ib_query1['NAME;ADDRESS;ZIP;CITY_NAME;...;STATE_NAME'] :=
> SpareRowValues;
> ...
> end;
>
> so You have to get "spare" values You want to copy BEFORE append/insert.
>
> Hope this helps...
>
> tibotaka
This looks like an interesting approch. Indeed my idea was to store the
actual row BEFORE the append insert. I thought some kind of a pointer to
the "last" row stays valid/accessable even after the append/insert. But it
doesn't look like there is something available in this direction.
So your idea is interesting and compact enough to give it a try. I can even
generate the necessary fieldnames during runtime in a simple loop.

I'll report,whether that think is working (probably until mid of next week).

Regards
Gunther



___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de