I'm fairly still new to android and I was wondering, what is the best way to get data from an android device to MS SQL server 2008? I've seen a number of people who have commented on several ways to do this but I'm looking for a means of somehow exporting the data as an XML based file and trying to send it via internet (maybe web service) to be inserted into MS SQL server. Problem is that I'm no开发者_运维技巧t sure how to take the XML file from an android device and get it to insert into MS SQL server. I am missing the steps in this process and I haven't seen anything that has clearly stated how to do this. For instance once you have the XML what do you do next, and so on? I just need some light to be shed on this subject anything would be much appreciated, thanks!
As much i understood your question that you want to send xml file's(that is in your phone) to mysql server, right?
if data is small and whole data can be send in one request,may be following steps usefull for you-
- read data from xml file you can use any technique like xml pull parser or dom.
- make a method for http request.
- make a service that will receive this http request and transfer it to server.
these are the very basic and common steps to perform this task... hope this will help...
How is the data stored on the device? Do you need to send it over the internet or are you exporting it via the usb cable?
If you sending data over the internet to a web server that will then insert this data into your MS SQL database, Android comes with some useful JSON APIs that make serializing the data pretty straight forward.
精彩评论