PDA

Click to See Complete Forum and Search --> : Sync Date / Time ???


Jigabyte
Nov 6th, 2007, 09:05 AM
Hi Peeps,

I have wrote an application for a PDA using VS2005 CF with Mobile 5 on the PDA. Sometimes the PDA locks up so they have to do a soft reset which solves the problem but it also resets the date and time to a manufacture default I think. Is there any routine I can use whilst I have an internet connection to get the correct date and time and set the PDA correctly.

My application sends and receives files on a regular basis so if I can get a routine to check at this point it would allow me to use the PDAs date and time.

Cheers

Jiggy!

Strider
Nov 6th, 2007, 07:34 PM
you could write a webservice that the device will call to retrieve the date & time and then update the device accordingly

Jigabyte
Nov 7th, 2007, 07:22 AM
Hi Mate,

Thanks for getting back to me. I could but I don't have a clue how to write a web service.

Any idease?

Cheers

Jiggy!

Strider
Nov 8th, 2007, 04:02 PM
create a webservice application from the different type of project when you create a new solution.
then create a method

public function getserverdate() As Date
return date.now
end function

add the webservice location ie: http://www.mywebsite.com/mywebservice/getdatetime.aspx
in the add web reference section in the CF solution.

then call the web service when the device has a internet connection ie: docked, wifi, gprs

Jigabyte
Nov 9th, 2007, 03:44 AM
I'll give that a go; thanks very much mate! I am assuming that the web service application is an ASP.NET solution that needs deploying on a web server?

Jiggy!

Strider
Nov 11th, 2007, 06:24 PM
yeah you are correct with that...
good luck with it