954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Connecting Android Application to a local MS SQL Server Database

So i have been searching all the net but haven't exactly found what I'm looking for and I'm starting to believe that it is impossible.

The problem is that I have a local MS SQL Server stored on my notebook. What I would like to do is an android application that can actually access this database from anyplace in the world (so to speak).

I have found this tutorial which connects to MySQL (I can edit it to connect to MS SQL). However this tutorial makes use of a database on a remote server and not a local.

http://downloadandroid.info/2010/05/how-to-connect-to-mysql-database/

Any help is greatly appreciated.

lukemaister
Newbie Poster
11 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

That tutorial is exactly what you need because your "local" database is local only to your laptop and not to any other device. And if you want to share that database you would have to provide means to do so like acquiring static IP for your laptop so you could connect to it from anywhere in the world.

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Thanks for your quick reply. SO what happens if my notebook uses dynamic ips and is different all the time? Wouldn't that make it impossible to connect?

lukemaister
Newbie Poster
11 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

Yes, your best chance is to get some hosting plan so IP would remain same. Then provide a way to access database, PHP/Java/.NET service that accept request and some parameters, runs the query and return results back to device

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

THanks for your reply. I have managed to connect using the tutorial I shared and the help you have given me. Thanks again.

lukemaister
Newbie Poster
11 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

You could use a dynamic domain service such dyndns to allow you to have a static domain name point at your various dynamic IPs.

I've used the service for some years to access my home computer which has a dynamic IP and can't fault it.

[edit]

I do understand how much this looks like spam post - being my first and all, but I'm not affiliated with dyndns, I just like their service and thought it'd help on this occasion.

Murrian
Newbie Poster
1 post since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: