G
Guest
I have SQL Server 2000 (SP3) and MDAC 2.6 (SP2) running on a machine that is
part of a small wireless network with a router and a cable modem. I have set
up the router to listen on port 1433 and redirect all such traffic to the
internal IP address (10.0.1.5) of the machine with SQL Server on it.
Based on what I have read, especially in article 269882 - How to Use ADO to
Connect to a SQL Server That Is Behind a Firewall, I am using this code in
Access to try to connect:
Dim remoteConn As Object
Dim remoteCmd As Object
Dim remoteRs As Object
Set remoteConn = CreateObject("ADODB.Connection")
Set remoteRs = CreateObject("ADODB.Recordset")
Set remoteCmd = CreateObject("ADODB.Command")
remoteConn.Open "Provider=SQLOLEDB;User ID=sa;Password=sapw;Persist
Security Info=True;Data Source=" & strServerName & ";Network
Library=dbmssocn;Trusted_Connection=Yes;"
remoteCmd.ActiveConnection = remoteConn
strServerName is the IP Address I get when I go to "What is my real IP" on
the SQL Server machine, and is also, I believe, the dynamic IP address
assigned to me by my cable modem ISP. Even though it is dynamic, it stays
static for some period of time - sometimes many days. In any case, I tell my
user what my IP address is today and they key it in.
When the above code is executed, the user gets the following message back:
Error # -2147467259 was generated by microsoft OLE DB Provider for SQL Server
Login failed for user '(null)' Reason: Not associated with a trusted SQL
Server connection.
Is the user actually hitting the SQL Server machine? Is this error
generated by the code components on his machine or by the SQL Server? How do
I get by the error?
part of a small wireless network with a router and a cable modem. I have set
up the router to listen on port 1433 and redirect all such traffic to the
internal IP address (10.0.1.5) of the machine with SQL Server on it.
Based on what I have read, especially in article 269882 - How to Use ADO to
Connect to a SQL Server That Is Behind a Firewall, I am using this code in
Access to try to connect:
Dim remoteConn As Object
Dim remoteCmd As Object
Dim remoteRs As Object
Set remoteConn = CreateObject("ADODB.Connection")
Set remoteRs = CreateObject("ADODB.Recordset")
Set remoteCmd = CreateObject("ADODB.Command")
remoteConn.Open "Provider=SQLOLEDB;User ID=sa;Password=sapw;Persist
Security Info=True;Data Source=" & strServerName & ";Network
Library=dbmssocn;Trusted_Connection=Yes;"
remoteCmd.ActiveConnection = remoteConn
strServerName is the IP Address I get when I go to "What is my real IP" on
the SQL Server machine, and is also, I believe, the dynamic IP address
assigned to me by my cable modem ISP. Even though it is dynamic, it stays
static for some period of time - sometimes many days. In any case, I tell my
user what my IP address is today and they key it in.
When the above code is executed, the user gets the following message back:
Error # -2147467259 was generated by microsoft OLE DB Provider for SQL Server
Login failed for user '(null)' Reason: Not associated with a trusted SQL
Server connection.
Is the user actually hitting the SQL Server machine? Is this error
generated by the code components on his machine or by the SQL Server? How do
I get by the error?