[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

synchronize sqlite database from handheld (windows 5 ce) with mysql (debian lenny)

Posted on 2010-09-07
5
Medium Priority
?
1,500 Views
Last Modified: 2013-12-21
Hello,

Could you please instruct me on the best approach to solve the following problem...

I have written an app in c# using .net CF  for windows  5  ce ( running on a dolhpin 6100 honeywell ) that inserts data to a database within the windows ce device (sqlite). Now the plan is to be able to unload the data from the sqlite in the windows ce device into a debian box that hosts a  mysql database.

At the moment what I do is I place the windows mobile device in the deck on a desktop pc and with active synch I get the sqlite database file that later I ftp it to the debian box that hosts the mysql database.

Then a script reads that file and inserts the record in the database.


What I want to achieve is a more elegant solution that would make it possible to read the file from within the windows mobile device (when I place it in deck  or wireless ) and directly unload it in the mysql server.

If I connect the device with the network and assign to it an ip would it be possible to connect to the mysql server from within the windows mobile? Eg have a button that says "Dump Data" that when I press it will try to find the mysql server (specific IP) connect to it and dump the data to the main database?

Or this is quite difficult to be done and I should just try to ftp from within the windows CE to the debian box and upload  the file there.

 

Any other opinions are welcome.

Thanks
0
Comment
Question by:vlachosg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 33624241
direct connection to mySql is definitely possible (personally I don't know how, but there are 3rd party products like this http://www.devart.com/dotconnect/mysql/download.html) - you might want to look for one that works on WinCE. I used DevArt components on WinMobile and it worked just fine, perhaps you could use the same on WinCE.

If your device is docked then you could use RAPI to read files on it from the desktop programmatically and then proceed as you described.

In general I'd say - develop a web service and connect to it directly from device, it's much easier than even ftp, which is not supported out of the box on WinCE devices.
0
 

Author Comment

by:vlachosg
ID: 33628546
just to clarify..  

what you mean is to create a web service in the debian box that will accept requests from the windows ce device?

That sounds quite interesting but

If yes what type of web service will be appropriate ? RESTFUL? SOAP?

Could you please explain a scenario that the device can send the data to the mysql and be able to validate that they where send correctly in terms of broken communication?

cheers
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 33628628
1) yes, I meant SOAP webservice, then WinCE can use wrapper class (created by VS when you specify web service's url) to communicate to it

2) I don't know all the details about comms to mySql, but since 3rd-party components do it hence I guess it is possible. As far as I understand they connect via tcpip to the server and then pass the data over it.

in case of web service you can return operation result and ensure the data is sent properly
0
 

Author Comment

by:vlachosg
ID: 33628819
1) I am not using VS I am using sharpdevelop so everything I ll do its going to be through sharpdevelop.

Is there any example of creating such a scenario just to see a bit of the code and decide being a newbie in c# wether I ll be able to go through with it.

2)I am intenting to build a php script that the windows ce will connect to it and send the data there..then php will do all the input to mysql so the windows ce wont have to deal with  mysql connections..


0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 2000 total points
ID: 33628886
#2 is definitely possible, you can do it via Http POST from the device

#1 can be irrelevant if you implement #2; I don't remember if SharpDevelop creates SOAP wrappers for you, but since VS uses standard cf.net assemblies for soap stuff I reckon it shouldn't be a problem. Anyway, there was wsdl.exe somewhere in SDK so you could convert wsdl definition file into c# class(es).

re. creating web service part - I've always used VS for that. So if I were you I'd go with php first, then explorer other options
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question