Receiving External PRN file from Server

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Yass
Posts: 41
Joined: November 11th, 2017, 1:26 am

Receiving External PRN file from Server

Postby Yass » February 6th, 2018, 6:17 pm

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: 77
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Receiving External PRN file from Server

Postby aaronw » February 8th, 2018, 4:29 pm

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;


Return to “Synchronization”