Author |
Topic |
kiwis
Starting Member
5 Posts |
Posted - 2010-11-24 : 19:50:42
|
I've got my SQL Server set up and working with my VB.NET application when connecting to the SQL Server from the same PC.However when i change my connection string to be a IP address it will not connect, why?Public ConnectString As String = "Data Source=207.167.717.614,8711;Network Library=DBMSSOCN;Initial Catalog=TableName; User=User; Password=Password;" My firewall it set up to allow this port, port forwarding is on. |
|
kiwis
Starting Member
5 Posts |
Posted - 2010-11-25 : 04:08:08
|
Anyone please? |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-11-25 : 07:40:03
|
Well...have you trued telnet'ing from your application server using this IP and port number? Open up a command prompt and type "telnet 207.167.717.614 8711" and see what happens.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-11-25 : 07:41:14
|
Oh and by the way: what's the deal about this ip 207.167.717.614?? As far as I know each octet only goes up to 255- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
kiwis
Starting Member
5 Posts |
Posted - 2010-11-25 : 12:40:03
|
Thanks for the reply. The IP is made up to hide my own.No I can't not telnet my IP. Should I be able to Telnet my own computer? |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-11-26 : 03:09:20
|
Is the VB.NET application running on the same server as the database? In that case using an IP might cause some problems depending on what the IP is. Try pinging the ip and also telneting just to see what happens. I'm not a network guy but I do remember seeing some problems using i.e. a public IP that is pointing back at the machine I'm trying to connect to. Keep in mind that when using an IP compared to i.e. "localhost" you will get network overhead because the packets will first go out to the router, maybe even out to the internet, and then back in to your server again instead of direct access using internal networking only.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
kiwis
Starting Member
5 Posts |
Posted - 2010-11-29 : 14:34:53
|
Thanks for the reply, I know you can't display a HTTP page via your own IP you must call localhost, I can't see anything that says that is the same for a SQL server?I've read endless manuals on this and everything i'm doing is correct however i can't telent <ip> <port number> why? |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-11-30 : 03:19:08
|
As far as I know there is no logical difference between the network traffic to a web server and a database server. The internal networking parts works exactly the same...the only real difference is the content of each packet and which port it's being sent across. What I usually do is to create an ODBC connection with the same name on each server that needs to communicate with the database. That way I can have the exact same connection string on all servers regardless if they are dev, test or production servers. Then it really doesn't matter if one server uses an IP address and another uses a DNS name...- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-11-30 : 03:20:28
|
Using ODBC also adds a layer of security since usernames/passwords are not exposed in any code.- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
|