Receiving External PRN file from Server

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Receiving External PRN file from Server

Post by Yass »

Hi Forum,

I have this line to bring a file from a server to my program folder for it to be use as a loadcase

...

Code: Select all

syncfile(GET, "/Drink/Supoort/CohortDrink.csdb", "CohortDrink.csdb");
The idea is to be updating the "CohortDrink.csdb" file from the server.

The sync works well but i can't see my file from the server coming into my folder "Support.
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Receiving External PRN file from Server

Post by aaronw »

What type of sync are you performing (Bluetooth, Dropbox, FTP, CSWeb)?

In the meantime you can accomplish the same thing by using syncdata. You will need to delete the CSDB file on the client and then call GET.
function ForceFullSync()

    if syncconnect(Bluetooth) then

        // Deleting the CSDB on the client will force a full GET sync
        close(SIMPLECAPI_DICT);
        filedelete("./Simple CAPI Data.csdb");
        setfile(SIMPLECAPI_DICT, "./Simple CAPI Data.csdb", create);

        if not syncdata(GET, SIMPLECAPI_DICT) then
            errmsg("Failed to sync SIMPLECAPI_DICT");
        endif;

        if not syncdisconnect() then
            errmsg("Failed to disconnect");
        endif;

    else
        errmsg("Failed to connect");

    endif;

end;
Post Reply