John

Use Fields[i].Value

Cheers
Martin

>  -----Original Message-----
> From:         John Christenhusz [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, April 02, 2001 16:38
> To:   Multiple recipients of list database
> Subject:      [DUG-DB]:  Field Type
> 
> G'day all,
> 
> I've got this application requiring to copy paradox records from one table
> to another. By doing that, only a few fields need a special procedure to
> follow. I was thinking about using one loop as an index for the records to
> copy and within that loop a second loop to check for any of these special
> field. Something like the following code:
> 
> 
>     with tblMaster1 do
>     begin
>       i := 0;      
>       while not eof do
>       begin
>         for iField := 0 to fieldCount - 1 do
>           if (tblMaster1.fields[iField].fieldName = 'City') then
>             tblSlave1.fields[iField].asInteger := SpecialFunction1;
>           else
>           if (tblMaster1.fields[iField].fieldName = 'Address') then
>             tblSlave1.fields[iField].asInteger := SpecialFunction2;
>           else
>             // just a straight copy
>             tblSlave1.fields[iField].as? := fields[iField].as?; // how to
> solve this ?????
>         next;
>         application.processMessages;
>       end;
> 
> But as you can see from the code, the problem is that for the "normal"
> fields the filed type is unknown (as indicated in the example with 'as?'.
> Is there any way of finding out what field type the current field is and
> to use that in the instead of the fixed asString?
> 

"WS SMTP relay" made the following
 annotations on 04/04/01 12:08:18
------------------------------------------------------------------------------

[INFO] -- Content Manager:
[MMSSOV] This e-mail message and any attachments are confidential to Sovereign Limited 
and subsidiaries and subject to legal privilege. If you have received this e-mail in 
error, please advise the sender immediately and destroy the message and any 
attachments.  If you are not the intended recipient you are notified that any use, 
distribution, amendment, copying or any action taken or omitted to be taken in 
reliance of this message or attachments is prohibited.

==============================================================================

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to