>>But honestly again I couldn't understand the scenario yet.
>>Cetin
>
>Hi Cetin,
>First of all many thanks for your answers.
>Now for a more clear explanation ( I hope... ) of the scenario :
>
>My application manages a network of print shops.
>
>1. My "client" app run on different sites (branches).
>
>2. I don't have a server of any kind, the data in each site is "site related" that means that every branch has it's own "set" of clients, jobs etc...
>
>3. I do want to gather all the client and job information from my branches for statistics and so forth...
>
>4. Now comes the Q. of the method: I thought of duplicating the tables on the client side, send them via "nethermind" to the manging station and re_join them into one bigger table on which I will run the various SQL's I wrote.
>
>That is why cursors or arrays are no good to me because the process does not happen concorently and not on the same working station.
>
>I hope this is clearer, and I hope you have more good ideas in your sleevs...
>
>Thanks Again,
>
>Gadi Hutt
IOW there are stations that are physically away and time to time data to be synched. There are a lot ways. First 2 I can think of :
1) Similar to preVFP days :) Check 'Offline data' in articles as I remember. I wrote that in my beginning days to VFP3 but still is applicable.
There each station prepares only modified, added and deleted records info of tables and send to other.
2) Check 'use offline'.
Now without these about truncation problem you could also do this :
-select ... into table && Fields truncated
-Table send. Receiving side:
open data myData.dbc
use original
add table ReceivedAndTruncated
use ReceivedAndTruncated in 0
for ix=1 to fcount()
lcFrom = alltrim(upper(field(ix,'ReceivedAndTruncated')))
lcTo = alltrim(upper(field(ix,'Original')))
IF !lcFrom == lcTo
ALTER table ReceivedAndTruncated ;
rename column &lcFrom to &lcTo
ENDIF
endfor
select Original
append from ReceivedAndTruncated
PS: Code is not tested and might need rectification.
Cetin