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.
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
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?
Re: Processing data on Activesync
Quote:
Originally Posted by
petevick
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
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.
Re: Processing data on Activesync
What error message do you get on deployment?
SyncServices would allow you to sync data with MySQL
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. :(
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