Is there a program/command that can compare 2 tables, a master and a copy,
i.e., with identical structures and continually update the copy as records
are updated in the master?

Re: finding Updated Records by Fred

Fred
Sat Aug 27 16:46:25 CDT 2005

Use a trigger on the master table.

--
Fred
Microsoft Visual FoxPro MVP


"Thanks" <louis_sorbera@msn.com> wrote in message
news:%23bMjT30qFHA.3604@tk2msftngp13.phx.gbl...
> Is there a program/command that can compare 2 tables, a master and a copy,
> i.e., with identical structures and continually update the copy as records
> are updated in the master?
>
>



Re: finding Updated Records by Thanks

Thanks
Sun Aug 28 05:37:34 CDT 2005

Thanks for the tip.
I've looked into TRIGGER.
I have one problem I don't own the master table, so I can't add it to a
database without affecting the other system that uses the table.

"Fred Taylor"

> Use a trigger on the master table.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
>> Is there a program/command that can compare 2 tables, a master and a
>> copy, i.e., with identical structures and continually update the copy as
>> records are updated in the master?
>>
>>
>
>



Re: finding Updated Records by Fred

Fred
Sun Aug 28 15:13:17 CDT 2005

Then you'll have to write code to compare the record counts, compare the
records between the master and the backup, etc. Much more involved.

--
Fred
Microsoft Visual FoxPro MVP


"Thanks" <louis_sorbera@msn.com> wrote in message
news:uObT$x7qFHA.4044@TK2MSFTNGP09.phx.gbl...
> Thanks for the tip.
> I've looked into TRIGGER.
> I have one problem I don't own the master table, so I can't add it to a
> database without affecting the other system that uses the table.
>
> "Fred Taylor"
>
>> Use a trigger on the master table.
>>
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>>> Is there a program/command that can compare 2 tables, a master and a
>>> copy, i.e., with identical structures and continually update the copy as
>>> records are updated in the master?
>>>
>>>
>>
>>
>
>



Re: finding Updated Records by Juan

Juan
Mon Aug 29 15:05:57 CDT 2005

Yeah.

Master Server -------- Master Table 5000 records

Child Server ---------- Backup Table 5000 records


suppose you added one to the master. the program would do this through the
day.

** possible code you can use
** Note: DO NOT OPEN ANY INDEXs and make sure you start with equal records
when you use this.
**
Use MasterTable Share in Select(1)
Use BackupTable Share in Select(1)

** Variables to hold record count as of program execution.
Select MasterTable
go bott
store recno() to MTCount

** Loop to continue checking for records added.
Do while .T.
Select MasterTable
go bott
If recno() > MTCount
go MTCount+1
do while !eof()
Scatter to SameData
Select BackupTable
Append Blank
Gather from SameData
Select MasterTable
MTCount = MTCount+1
enddo
EndIf
EndDo

I am sure there are more suffisticated ways of doing this but this is just a
rough code of what you can do.



"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:uwd%23tzArFHA.1788@tk2msftngp13.phx.gbl...
> Then you'll have to write code to compare the record counts, compare the
> records between the master and the backup, etc. Much more involved.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Thanks" <louis_sorbera@msn.com> wrote in message
> news:uObT$x7qFHA.4044@TK2MSFTNGP09.phx.gbl...
>> Thanks for the tip.
>> I've looked into TRIGGER.
>> I have one problem I don't own the master table, so I can't add it to a
>> database without affecting the other system that uses the table.
>>
>> "Fred Taylor"
>>
>>> Use a trigger on the master table.
>>>
>>> --
>>> Fred
>>> Microsoft Visual FoxPro MVP
>>>
>>>
>>>> Is there a program/command that can compare 2 tables, a master and a
>>>> copy, i.e., with identical structures and continually update the copy
>>>> as records are updated in the master?
>>>>
>>>>
>>>
>>>
>>
>>
>
>