Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 22nd, 2007, 03:31 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Building a connectionstring to a remote computer

In practically all the books i have about visual basic 2005 databases,all examples speaks about a database that exists on a local server. But what about a database that is on a server on a remote computer that is only reachable via the internet. For example:
I have a database that exists on the sql server 2005 on my desktop.
This desktop is connected to the internet. I have a laptop on wich i have my ADO.NET database program (in vb 2005). This laptop has a wireless connection with the internet. Now i like to connect from my laptop to the database on my desktop via the internet. The problem is that the IP address of my desktop is a dynamic IP address. How do i have to construct my connectionstring ? I heard about a program that solves the problem of dynamic IP addresses. Is it possible to use this program in relation to my ADO.NET program, and how do I put the address to my database on the server on my desktop in the connectionstring ?

Reply With Quote
  #2 (permalink)  
Old June 22nd, 2007, 11:54 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

There are dynamic DNS services that will change a url to the dynamic IP automatically. You then can just set the "server" of your connection string to the domain and as long as the IP stays up-to-date it will work.

Depending on what your connection is at home (cable/dsl) you may have a much more statis IP than you think. I have a cable modem which does have a dynamic IP but I have my domain pointed at it and it very seldom changes. Typically, if the modem is connected all the time it won't change IPs. Usually I'll see it change when I turn it off for more than a few minues. It has mainted the IP thru restarts, short power outages, etc.

(Please note this disclaimer: Depending on your agreement with your ISP you might be violating your service contract by running a server or server-like services [i.e. database] on your connection.)

You do need to expose your server at home thru your internet connection.

If your computer is connected directly than you don't need to change anything with the hardware but you will likely need to change your OS firewall settings to allow requests for SQL server to come in.

If you have a router on your connection then you need to open the SQL port to point to your desktop at home. You'll have to refer to your router instructions for details.

The standard SQL server port is 1433. Just keep in mind that you are opening your database server to the world so make sure you have very string passwords for the accounts (most importantly the SA account).

-Peter
Reply With Quote
  #3 (permalink)  
Old June 29th, 2007, 07:03 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

generally u use Public IP Address whn u want to host a remote server over the internet
try tht

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
where to put my connectionstring pascali70 C# 10 June 22nd, 2007 05:09 AM
the ConnectionString Property... coolb C# 3 September 26th, 2006 02:05 AM
Windows Service can't access remote computer ADMystery General .NET 0 September 25th, 2006 03:56 AM
How you run a program in another computer (remote) Maritza Beginning VB 6 1 November 25th, 2005 12:51 AM
The ConnectionString property...! rajesh0363 All Other Wrox Books 2 July 26th, 2005 01:55 PM



All times are GMT -4. The time now is 02:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.