Tuesday, March 27, 2012

connecting to SQL Server 2000 from a VB.net app using ADO.net

Hi
I can connect from my app to sql server on the local lan, but I can't connec
t over the
Internet. I can't create a remote connection in Enterprise Manager. However,
I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;
Database=******;Network Address=****
**
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan a
s the
SQL Server machine. However, whenever I try to connect across the Internet (
from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over t
he LAN
but not over the Internet? I suspect some networking thing, like a firewall
on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-clie
nt
interfaces implemented in front of them. I have never tried to do this from
a Windows
fat-client, and I suspect very poor performance and excess resource utilizat
ion on
the server
Any help or article will be appriciatedIn terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:

>Hi
>I can connect from my app to sql server on the local lan, but I can't conne
ct over the
>Internet. I can't create a remote connection in Enterprise Manager. However
, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
> ID=******;Password=******;Server=******;
Database=******;Network Address=***
***
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan
as the
>SQL Server machine. However, whenever I try to connect across the Internet
(from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over
the LAN
>but not over the Internet? I suspect some networking thing, like a firewall
on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-cli
ent
>interfaces implemented in front of them. I have never tried to do this from
a Windows
>fat-client, and I suspect very poor performance and excess resource utiliza
tion on
>the server
>Any help or article will be appriciated

No comments:

Post a Comment