Synchronization error between enumerator and supervisor

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Synchronization error between enumerator and supervisor

Post by khurshid.arshad »

Dear Team;

When i try to transfer all ".dat" files from supervisor tablet to enumerator tablet with the code 1, it works. When i try to transfer a specific file from supervisor tablet to enumerator table, it gives me error Please see code 2. the picture is attached for error message."

Code 1:

Code: Select all

function Syncronizationdata()
	If Sel=1  then //Synchronization: Receive Assigned households from Supervisor
		if syncserver(Bluetooth, "..") then
			syncdisconnect();
				stop(1);
		else
		endif;
	elseif Sel=2   then	//Synchronization: Send Assigned households to Enumerator
		if syncconnect(Bluetooth) then
		syncfile(PUT, "../CASH/*.dat", "/CASH/" );//First Path is "FROM" and second Path is "TO"//working
								syncdisconnect();
								stop(1);
		else
		endif;
	endif;
end;
Code 2:

Code: Select all

function Syncronizationdata()

	If Sel=1  then //Synchronization: Receive Assigned households from Supervisor
		if syncserver(Bluetooth, "..") then
			syncdisconnect();
				stop(1);
		else
		endif;
	elseif Sel=2   then	//Synchronization: Send Assigned households to Enumerator
		filesname=concat("Target Household Assignment-", edit("9999",CL_Cluster));
		if syncconnect(Bluetooth) then
			syncfile(PUT, "../CASH/" + filesname + ".dat", "/CASH/" );//First Path is "FROM" and second Path is "TO"
								syncdisconnect();
								stop(1);
		else
		endif;
	endif;
end;
[img]
http://idspak.com/Screenshot_2017-06-21-11-37-49.jpeg
[/img]

Thanks.
a.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Synchronization error between enumerator and supervisor

Post by josh »

Are you sure the filename is correct? That error only comes up when the file doesn't exist on the device.

If the filename is correct please zip up the CSEntry directory on the supervisor tablet and send it to use so we can check.
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Synchronization error between enumerator and supervisor

Post by khurshid.arshad »

Dear Josh;

Thank you and you were right. My file name was not correct.
Thanks.
Arshad
Post Reply