Results 1 to 6 of 6

Thread: Sync Date / Time ???

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Sync Date / Time ???

    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!

  2. #2
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Sync Date / Time ???

    you could write a webservice that the device will call to retrieve the date & time and then update the device accordingly
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Re: Sync Date / Time ???

    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!

  4. #4
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Sync Date / Time ???

    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
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Re: Sync Date / Time ???

    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!

  6. #6
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Sync Date / Time ???

    yeah you are correct with that...
    good luck with it
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width