A
Avi
Hi everybody,
The following is an introduction describing my small workgroup network
setup. After that will come description of the problem.
I have 3 machines. Machine 1 is installed with windows 2000 server
and ms sql 2000 enterprise edition. Machine 2 and 3 are installed
with windows 2000 and XP, resepectively. All the machines are
connected to one another to the through workgorup setup into a router,
ehich in turn, is connected to the cable modem of ISP optimum online.
All the connections seem to work fine and each computer cab access one
another as well as the internet. I run from machine 2 the following
snippte of code :
sub TestWithinWorkGroup()
Dim sqlconn As New ADODB.Connection
Dim rs As ADODB.Recordset
ConnectionString = "Driver={SQL Server};" & _
"Server=192.168.0.2;" & _
"Address=192.168.0.2,1433;" & _
"Network=DBMSSOCN;" & _
"Database=pubs;" & _
"User ID=sa;" & _
"Pwd=******"
sqlconn.Open ConnectionString
Set rs = sqlconn.Execute("select * from authors")
Debug.Print rs("au_fname")
End sub
That code is a test performed SUCCESSFULLY inside the workgroup.
Without getting into the details of the code, I would mention that
Machine 1, where the database is, has a private network ID of
192.168.0.2, which used in the VB code,s connection string, along with
the port number, port 1433. Machine 2, from which the code was
executes has a private network ID of 192.168.0.3. I guess the IP
address(i.e., 192.168.0.2) and the port number(1433) are the only two
so-called arguments that are relevant to the problem at hand, which
can be summarized by the following question : what do I have to do in
order to make this test work when running that snippet of code from a
machine OUTSIDE the workgroup (e.g., some machine on the internet)?
One thing I know for sure is that I need to replace any IP address
occurence of 192.168.0.2 (where the database is) with the IP address
known of the that workgroup as it's lookup upon from the internet. A
small check tells me that my DYNAMIC IP address is 24.191.235.110.
Anything that needs to be done or configured in addition to the
aforementioned replacement is another good guess at best, a question
mark at worst. Since I have tried many things already and nothing
yielded any good result, I can be sure only about the requirement to
replace (inside the vb code snippet) the IP of the private network
related to machine 1 with the public Ip address of the small
workgroup, and foregive me for my bad terminologi if indeed that is
the case.
It is important to note that even though the IP I mentioned above
(e.g., 24.191.235.110) is DYNAMIC, the intended test from a remote
machine can be successful as long as the IP does not change by the ISP
system, which is possible if the cable modem power is not turned off.
But even if it worked only once, I will be happy, since I'm only
testing. And when the test is successful, I'll know excatly what I'am
required to do with respect to the entire WORKGROUP configuration, or
maybe just the configuration of the router or Machine 1.
Let's review all of the above: We know that the internal setup is a
workgroup, connected to the internet with a router. We know that a
successful test worked in the context of a workgroup.
My goal is to perform tha test from a remote machine in which the vb
snippet above, with small adaptation, will be executed in order to
connect and run a query with respect to the database in Machine 1.
If there is anyone out there in this discussion group that can help me
bring about a remote successful test for once and for all, then I will
be greatly appreciative. If you can provode me a step by step
instructions to follow, then it will be all the better.
Thank you in advance
Avi
The following is an introduction describing my small workgroup network
setup. After that will come description of the problem.
I have 3 machines. Machine 1 is installed with windows 2000 server
and ms sql 2000 enterprise edition. Machine 2 and 3 are installed
with windows 2000 and XP, resepectively. All the machines are
connected to one another to the through workgorup setup into a router,
ehich in turn, is connected to the cable modem of ISP optimum online.
All the connections seem to work fine and each computer cab access one
another as well as the internet. I run from machine 2 the following
snippte of code :
sub TestWithinWorkGroup()
Dim sqlconn As New ADODB.Connection
Dim rs As ADODB.Recordset
ConnectionString = "Driver={SQL Server};" & _
"Server=192.168.0.2;" & _
"Address=192.168.0.2,1433;" & _
"Network=DBMSSOCN;" & _
"Database=pubs;" & _
"User ID=sa;" & _
"Pwd=******"
sqlconn.Open ConnectionString
Set rs = sqlconn.Execute("select * from authors")
Debug.Print rs("au_fname")
End sub
That code is a test performed SUCCESSFULLY inside the workgroup.
Without getting into the details of the code, I would mention that
Machine 1, where the database is, has a private network ID of
192.168.0.2, which used in the VB code,s connection string, along with
the port number, port 1433. Machine 2, from which the code was
executes has a private network ID of 192.168.0.3. I guess the IP
address(i.e., 192.168.0.2) and the port number(1433) are the only two
so-called arguments that are relevant to the problem at hand, which
can be summarized by the following question : what do I have to do in
order to make this test work when running that snippet of code from a
machine OUTSIDE the workgroup (e.g., some machine on the internet)?
One thing I know for sure is that I need to replace any IP address
occurence of 192.168.0.2 (where the database is) with the IP address
known of the that workgroup as it's lookup upon from the internet. A
small check tells me that my DYNAMIC IP address is 24.191.235.110.
Anything that needs to be done or configured in addition to the
aforementioned replacement is another good guess at best, a question
mark at worst. Since I have tried many things already and nothing
yielded any good result, I can be sure only about the requirement to
replace (inside the vb code snippet) the IP of the private network
related to machine 1 with the public Ip address of the small
workgroup, and foregive me for my bad terminologi if indeed that is
the case.
It is important to note that even though the IP I mentioned above
(e.g., 24.191.235.110) is DYNAMIC, the intended test from a remote
machine can be successful as long as the IP does not change by the ISP
system, which is possible if the cable modem power is not turned off.
But even if it worked only once, I will be happy, since I'm only
testing. And when the test is successful, I'll know excatly what I'am
required to do with respect to the entire WORKGROUP configuration, or
maybe just the configuration of the router or Machine 1.
Let's review all of the above: We know that the internal setup is a
workgroup, connected to the internet with a router. We know that a
successful test worked in the context of a workgroup.
My goal is to perform tha test from a remote machine in which the vb
snippet above, with small adaptation, will be executed in order to
connect and run a query with respect to the database in Machine 1.
If there is anyone out there in this discussion group that can help me
bring about a remote successful test for once and for all, then I will
be greatly appreciative. If you can provode me a step by step
instructions to follow, then it will be all the better.
Thank you in advance
Avi