Synctime Function with Bluetooth

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Post Reply
khurshid.arshad
Posts: 608
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Synctime Function with Bluetooth

Post by khurshid.arshad »

Dear Team;

When i use the live ip or domain name, the synctime fuction works, but it does not workth with the bluetooth. Here is my code.

Get the value notappl;

Thanks.
a.


if designation=1 then
getsyntime=synctime(HHINTERVIEW_DICT, "http://servername/synchapp/api");
else
getsyntime=synctime(HHINTERVIEW_DICT,"Bluetooth");
endif;
justinlakier
Posts: 219
Joined: November 21st, 2022, 4:41 pm

Re: Synctime Function with Bluetooth

Post by justinlakier »

Hello,

See the SyncTime documentation. This should be returning the last sync with any BlueTooth device, giving notappl if there was no synchronization. Have you had any BlueTooth synchronizations with this device? If not, then notappl is the expected return value. You can test this by doing a BlueTooth synchronization and then checking if synctime(HHINTERVIEW_DICT) matches synctime(HHINTERVIEW_DICT, "Bluetooth"), as the latest synchronization time should also match the latest BlueTooth synchronization time.

Hope this helps,
Justin
khurshid.arshad
Posts: 608
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Synctime Function with Bluetooth

Post by khurshid.arshad »

I have already tried all the scenario but with no result. When I use the Bluetooth for synchronization, the data transfers from one device to another but it shows the notappl for the synchronization timing.

Here is my code

Function SendSupervisor()

dirlist(db_files, "..\103 - Data\","HH_"+ edit("9999",SYNCHLOGIN_ID)+"*" +".csdb");

If designation=2 and db_files.length()=0 then
errmsg ("You dont have the Household Data to send the Supervisor");

reenter;
else

If designation=1 then //Login as Supervisor

If syncserver (Bluetooth, "..") then // Get the Household data from enumerator
syncdisconnect();
else

endif;

elseif designation=2 then //Login as Enumerator
if syncconnect(Bluetooth) then // Send the Household Data to the supervisor
syncfile(PUT, "..\103 - Data\HH_4321_0011.csdb", "/103 - Data/");
syncdisconnect();
endif;
endif;
endif;

reenter; //add new line

end;
Attachments
notime.png
notime.png (4.9 KiB) Viewed 5838 times
justinlakier
Posts: 219
Joined: November 21st, 2022, 4:41 pm

Re: Synctime Function with Bluetooth

Post by justinlakier »

Hello,

Try using SyncData(PUT, HHINTERVIEW_DICT) instead of SyncFile. SyncData should be used for CSPro data files. This way cases of the dictionary will be synced and the dictionary's synctime will be updated, rather than a new file being uploaded.

Hope this helps,
Justin
Post Reply