1 Replies - 4166 Views - Last Post: 19 May 2010 - 06:29 AM Rate Topic: -----

#1 annaidurai  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-May 10

replacing or updating field from other table in foxpro

Posted 16 May 2010 - 03:47 AM

please give me example to replace or update a field from other table in foxpro.
Is This A Good Question/Topic? 0
  • +

Replies To: replacing or updating field from other table in foxpro

#2 ZRonZ  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 203
  • Joined: 09-January 09

Re: replacing or updating field from other table in foxpro

Posted 19 May 2010 - 06:29 AM

View Postannaidurai, on 16 May 2010 - 02:47 AM, said:

please give me example to replace or update a field from other table in foxpro.

Here's an example:
Create a table named "fred" with at least 2 fields, the second named "address", in it and put some data in it. Copy the structure to a table named "wilma". The following will take the first record from fred, then append a blank record to wilma and replace the address field with the address from the record retrieved from fred. Modify to meet your need for replacing or updating a field from another table in VFP or new data.

CLOSE ALL
USE fred IN 1
USE wilma IN 2

SELECT 1
GOTO top
COPY next 1 to array mB

SELECT 2
APPEND BLANK
REPLACE address WITH  mB[2]
BROWSE


Was This Post Helpful? 1
  • +
  • -

Page 1 of 1