How do I get data from external SQL Database into Android application?
<p>I am working on an app that needs to pull some data that is stored on a MS SQL 2008 Server. Basically a front end PC application submits data to this database and I want to share this data through my mobile application.</p>

<p>I created a few stored procedures on the server that returns the data that I would like to reference in my app. Please note that I am only recieving data to the app and not trying to modify the database tables in anyway. The data I need to send to the app requires NO CONDITIONS so it is a simple call without passing any parameters to the DB Server. I also created a WCF REST service to handle that has a class that returns basically the data from the stored procs I want to use.</p>

<p>Here is my question, what is the best way to retrieve this data from the database and can someone provide me with an example? I believe there are a few different ways to handle this such as;</p>

<ol>
<li>Copying the records into a SQLite DB and then transfering it to the device;</li>
<li>Interacting with the REST service through the application;</li>
<li>Creating a class that connects directly to the database;</li>
</ol>

<p>I've been trying method #2 but haven't had much luck in getting the application to consume the service. If this is the best way to handle it maybe you can point me to a tutorial on the subject that would be useful as every tutorial I've looked at so far hasn't really helped. I would think there would be some pretty simple methods on handling a datasource from an external database. </p>

<p>Thank you and best regards</p>
