Hello,
is it possible to update a DBF file on a remote system.
Thank you in advance
Otto
Hello,
is it possible to update a DBF file on a remote system.
Thank you in advance
Otto
Otto,
you can update a remote dbf in real time in this way
- write in a log dbf table every time a user touch a record (User=001 Dbf=Customer Recno=10 Do=20190730140301)
- a program that is always active read in polling from this log table if there are news records to process and if a new records is found:
open local dbf
open remote dbf (they are identical in structure)
verifies if record 100 is present in the two tables
if record does not exist makes an append blank until does not reach the number of records
perform a comparison of every single field of the same record writing the differences in remote dbf
I use this software since there were several archival corruption issues (corruption detected)
I saved the contents of the tables many times without recovering from the night before but at most from one minute before the corruption.
This could be another solution for those situations in which is very difficult to open two dbf (local and remote)
SELECT 0
USE fa ALIAS local
SELECT 0
USE fa ALIAS remote
For every modified record you can create a dbf table with this name
for example
FA#0000000001#num_fa#FA_00001-------#20190730140101.dbf
where
FA is the name of te table
You can send to the "remote" every one of this dbf tables
on the other side (in the remote) a program reades this new dbf tables aDir := directory( "*.dbf")
for every element of aDir
USE FA
GOTO 1 or DBSEEK( FA_00001 )
and than
compare the fields of the record
bye
Hello Marco,
thank you. How do you send the DBF file.
Best regards
Otto
it all depends on scenario
- ftp
- mail (zip attached)
- copy if you are mapped
use harbour netio, it works very well.
http://harbourlanguage.blogspot.com/201 ... netio.html
Regards,
For use log file, try with native rdd of harbour LOGRDD
https://github.com/harbour/core/blob/ma ... logrdd.prg
Sample
Muy buena la referencia Crist贸bal al LogRdd, pero creo que al LogRdd le hace falta un campo que no sea el Recno() (sensible al PACK) para referenciar los registros.
En todo caso, obviando el PACK, es una soluci贸n que me parece muy buena y que nos puede permitir hacer facilmente un sincronizador de tablas.
Tambi茅n grabar铆a en el LogRdd la fecha y la hora pensando en sincronizar desde varios origenes.
hmpaquito wrote:Muy buena la referencia Crist贸bal al LogRdd, pero creo que al LogRdd le hace falta un campo que no sea el Recno() (sensible al PACK) para referenciar los registros.
En todo caso, obviando el PACK, es una soluci贸n que me parece muy buena y que nos puede permitir hacer facilmente un sincronizador de tablas.
Tambi茅n grabar铆a en el LogRdd la fecha y la hora pensando en sincronizar desde varios origenes.
Hello,
thank you all.
I think with mod harbour this becomes an interesting.
If we want to update our DBF files on the webserver we need some kind of database server.
Best regards
Otto
Otto wrote:
If we want to update our DBF files on the webserver we need some kind of database server.
Otto
Dear Cristobal,
I mean for data exchange between desktop and web.
For example if you use web for reports you have to upload data. FTP is a problem as you need firewall setup on client side.
I know we can use SQL but I would like to stay with DBF files.
Best regards
Otto
Ciao Otto
I use this system, simple and functional
Client side --> DBF database
Server side --> Mysql
You can keep both tables up to date without problem, errors of FTP
delegate everything to mysql
Maurizio