>We have several offices with the same database structure. We need to transfer different records from different tables via ftp.
>
>For example, I may need to tranfer a record of the client file from office 1 to office 2. But it has to be generic to handle different types of table.
>
>So I was thinking of using a dbf for data transfer: a) copy the record in a standalone dbf, b) ftp to other office and c) copy from this dbf to the client file.
>
>My problem is that I may have long field names in the table so I would lose them if I use a standalone dbf.
>
>So should I use xml to tranfer ? If I do a cursortoxml in a file from office 1 and a xmltocursor at the other office, is is ok ?
>
>Any other suggestion ?
>
>
>(I am using vfp8)
>
>
>thks
>Eric
Eric,
You have many many options.
-If tables do not contain memo, general fields then simpliest would be:
copy to ... type delimited && sender
append from ... type delimited && receiver
-XML as it comes to mind and popular:) - but has too much redundant info. Would result in bigger files than what it might be (both sides are VFP so I don't see this one as a solution).
-Generate stand alone tables and FTP those. This would work despite long field names because since structures are same receiver can do copy to array, append from array (or insert into ... select ...).
-Generate a single dbc for transfer purposes. Select from multiple tables into tables of that dbc. This sounds to be simpliest and effective to me. ie:
create database ('myTransferFolder\Transfer')
select * from myCurrentDBC!myTable ;
into table ('myTransferFolder\myTable) ;
database ('myTransferFolder\Transfer')
-Select and save into ado recordsets. Transfer saved recordsets.
...
PS: Also another method is to create views and take them offline. You could send 'offline' files which they could take 'online'. This is complex (IMHO) but allows cross updates.
Cetin