Solved

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

Posted on 2010-09-07
5
1,467 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 500 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 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