SQL Server on the internet

paulthepaddy

Well-known member
Joined
Apr 9, 2011
Messages
222
Location
UK
Programming Experience
Beginner
Hi guys,

i am way out of my reach here, looked on google and can't find a simple tutorial or anything that will give me a simple answer.

basicly i have an application that is going to use 2 tables.

i want the application to be able to use a database that is saved on my PC that can bb accessable from another PC that is NOT on my network, so basicly over the internet. the database doesn't hold much information we arn't talking 1000's of records maybe only a few hundred at most.

i really dont know where to start so any information on this would be a great help
 
You're going to have to expose your machine to the internet, which is risky from a security point of view. Exposing the database itself is probably not an option. You should most likely create a web service and then allow that through your router. Your application can access the web service and it can access the database.
 
ok thanks for the reply, but as i said i am way out of my confort zone(which isn't big anyways lol) but how do i go about creating a web service, i have sql installed and seems far to advanced for what i need :d but again i dont know. i really thought it would be as easy as making a table and allowing accesse to an Ip address through my router.

P.S im gona google it but im not sure how far i will get :D
 
G'd Afternoon Paul,
In fact is easier to share your db in sql server than in ms access. Taking this approach you won't need to leave your confort zone. all tha you will need to change is your connection string.
Your MS Access db will be smoothly imported to your SQL Server this is really painless.
MS Access is not for sharing outside the network, so you have few options. Like our moderator said you can use a webservice, but in that case you will need to host your service in a webserver (IIS or any other). Another option is to build a tunnel (VPN) between your PC (the server) and the other end (the Client), plus create a share in your pc that should be mapped on the client. In both cases is far complex than sql.
Once you have your data in SQL the connection string may look like this:
VB.NET:
Expand Collapse Copy
strConn = "Data Source=youipaddress,1433;Initial Catalog=yourDbName;User Id=youlogin;Password=yourpassword;"
Last thing you will need to change are the libraries, from Oledb to sqlclient and all your code remain the same.
G'd Luck
 
Back
Top