Hi,
Data download from the FTP server, Can this process will be an automatic process. can we have a script, that we use in the program and data will automatically download on the laptop?
Regards,
Automatic data download
Re: Automatic data download
Sure, I've written a batch app to upload data before (see below). You'd just need to modify it and use Windows scheduler to run the PFF.
https://en.wikipedia.org/wiki/Windows_Task_Scheduler
https://en.wikipedia.org/wiki/Windows_Task_Scheduler
PROC UPLOAD_LOOKUP_DATA_FF
if not syncconnect(CSWeb, serverURL) then
errmsg("Error connecting to CSWeb server: %s", serverURL);
else
when syncdata(PUT, ASSIGNMENTS_DICT);
true -> errmsg("Synced assignments (%d cases) to %s", countcases(ASSIGNMENTS_DICT), serverURL);
false -> errmsg("Error syncing assignments to %s", serverURL);
endwhen;
syncdisconnect();
endif;
if not syncconnect(CSWeb, serverURL) then
errmsg("Error connecting to CSWeb server: %s", serverURL);
else
when syncdata(PUT, ASSIGNMENTS_DICT);
true -> errmsg("Synced assignments (%d cases) to %s", countcases(ASSIGNMENTS_DICT), serverURL);
false -> errmsg("Error syncing assignments to %s", serverURL);
endwhen;
syncdisconnect();
endif;
Re: Automatic data download
Thanks, but I want to download it from the FTP server. Can you please give some example and help
Regards,
Regards,
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Automatic data download
The sync functions are the same once you've connected. Instead of using CSWeb in the syncconnect call, you can connect using syncconnect(FTP, ...).
Another option is to use Data Viewer to download your data. When you do this, you'll get a .pff file that contains the information needed to update the data file. If you run this .pff, or add it to the Task Scheduler, you should be able to keep your data updated.
Another option is to use Data Viewer to download your data. When you do this, you'll get a .pff file that contains the information needed to update the data file. If you run this .pff, or add it to the Task Scheduler, you should be able to keep your data updated.