Results 1 to 7 of 7

Thread: Processing data on Activesync

  1. #1

    Thread Starter
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Processing data on Activesync

    Here is the scenario. I have a Windows Mobile 6 device. It has a bar-code reader on it and I'm programming an application on it using VB2k8 and CF 3.5. The application lets the user scan data in and it saves the data to text files.

    What I want to do is this:
    When the user docks the remote device, I want ActiveSync to move those data files to a location on the docking PC, regardless if my back-end program is running or not.

    If my back-end program happens to be running, alert it when the device gets docked so it can immediately process the datafiles.


    Is there some sort of events I can hook into when an ActiveSync connection happens?

    Thanks for any assistance.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Processing data on Activesync

    Hi,
    you need to take a look at RAPI - OpenNetCF have a desktop RAPI library.

    You can certainly find out on the device, but the desktop may be more tricky - maybe run as a service, trying to connect to the device using RAPI

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3
    Addicted Member
    Join Date
    Jun 2007
    Posts
    128

    Re: Processing data on Activesync

    I havn't done it, but isn't it pretty easy to use activesync to transfer sql compact data to a desktop server? Is there some reason the data has to be stored in text files instead of a database?

  4. #4

    Thread Starter
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Processing data on Activesync

    Quote Originally Posted by petevick View Post
    Hi,
    You can certainly find out on the device, but the desktop may be more tricky - maybe run as a service, trying to connect to the device using RAPI
    I'd prefer if it didn't have to run a separate program as a service and could somehow just do it through ActiveSync, but the more I research ActiveSync, the more I'm learning how truly terrible a system it is.

    Quote Originally Posted by KMDcomp View Post
    I haven't done it, but isn't it pretty easy to use activesync to transfer sql compact data to a desktop server? Is there some reason the data has to be stored in text files instead of a database?
    Yea, I can't get the bloody device to take the SQL CE deployment. I get an error every time I try to deploy a project with it.

    Also, my backend database is MySQL. I don't know how much that makes a difference in ActiveSync, but I wouldn't be surprised if instead of using a generic data provider system, it ONLY works SQL CE to MSSQL Server. Again, I haven't explored this at all since I can't get SQL CE to deploy on the device I'm programming for.

    Also, the data on the server has unique keys that are generated at creation (auto_number field). I'm tracking "virtual keys" on the remote device (placeholder tokens). I may tell the remote device to generate a new item from scratch (thus, generates a new placeholder token to serve as a key), use it, and delete it all before syncing. The virtual keying tells the software "whatever you assign as this item's actual, unique key, you need to use that in these other entries", and thus, record keeping is maintained.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  5. #5
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Processing data on Activesync

    What error message do you get on deployment?

    SyncServices would allow you to sync data with MySQL
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  6. #6

    Thread Starter
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Processing data on Activesync

    Wouldn't you know it... I tried adding a CE datafile again and this time it deploys just fine.

    Ok, I got the mobile application writing data to the CE datafile. You mentioned SyncServices? How would I get it so data on the device is transferred to the server and then removed from the device?

    Got any examples of doing this, because I'm turning up little to nothing in Google.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  7. #7
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Processing data on Activesync

    HI,
    take a look at http://msdn.microsoft.com/en-us/sync/default.aspx - description and samples for devices

    Not the easiest concept - but it works.
    Alternately, I THINK that there is a client around for MySQL on devices, that would allow you to access your MySQL database from your device directly.


    http://nicholas.piasecki.name/blog/2...act-framework/

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

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