Re: TZF - Copy a record to virtual file
[email protected] Thu, 14 Aug 2003 16:01:25 EDT
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Thanks Phil - this solves an ongoing problem for
me also. It gets a lot simpler when someone
points you to the correct page in the book.
Bob
> Pierre,
>
> Look at the AssignUserPointer method.
>
> You said that both databases have the same structure so you need to create
> only one type statement defining the structure of a Customer record. Then
> define two pointers one for the customer database (CustomerPtr) and one for the
> virtual database (VCustomerPtr). Use the AssignUserPtr method to initialize
> the pointer to their corresponding databases. Then VCustomerPtr^ :=
> CustomerPtr^ should copy the record to the virtual databases record structure. Finally
> you need to do an append in the virtual database.
>
> The code would look something like this:
>
> type
> Customer_Record = record
> _Deleted : boolean;
> First_Name : string[20];
> Last_Name : string [20];
> .
> .
> .
> end;
>
> var
> CustomerPtr : ^Customer_Record;
> VCustomerPtr : ^Customer_Record;
>
>
> begin
> Customer.AssignUserPtr (CustomerPtr);
> VCustomer.AssignUserPtr (VCustomerPtr);
>
> { find the record to copy to the virtual database }
>
> VCustomerPtr^ := CustomerPtr^;
> VCustomer.Append;
>
> Give this a try.
>
> Phil Kidder
>
>
--^----------------------------------------------------------------
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------