By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,316 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,316 IT Pros & Developers. It's quick & easy.

Remote ADO connection to SQL Server (MSDE)

P: n/a
Hello everyone,

Using Access 2003 and MSDE "This is a follow up of a recent post"

I'm trying to build an application, which I plan to distribute to
remote client computers and connect the font ends to the back ends
purely through the internet.

The Sql Server (MSDE) is hosted on my computer running Windows XP Home
edition, and I already enabled MSDE to accept TCP/IP on port 1433.

For testing purposes I copied the adp to a different computer connected
to the internet on a dial up and I'm using the following code on an
"on open" even on one of the forms (unbound), but all I get is an error
when I try to open the form. The funny thing is that when I run exactly
the same adp application on the MSDE host computer it does connect

The code is as follows;

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
cn.Open "Provider=sqloledb;" & _
"Network Library=DBMSSOCN;" & _
"Data,1433;" & _
"Initial Catalog=NorthwindCS;" & _
"User ID=sa;" & _

'Create an instance of the ADO Recordset class,
'and set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = "SELECT * FROM Customers"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
End With
'Set the form's Recordset property to the ADO recordset
Set Me.Recordset = rs
Set rs = Nothing
Set cn = Nothing

I configured the firewall on the host computer to accept connection
from the remote computer by specifying its IP address and still no

Any help would be appreciated

Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
I'm grabbing at straws trying to help, there are so many things that
could cause something like this. Are you taking routing into
consideration? If the MSDE box is behind a router, you are going to
have to use the router's wan ip in your ado code and forward port 1433
to the msde box.

Nov 16 '05 #2

P: n/a
Some ISPs providing Dial-Up block Port 1433.

Nov 16 '05 #3

P: n/a
I went to the LOG file of the MSDE and used the IP address which was
listed as "listening" for my code.

Nov 16 '05 #4

P: n/a

I went to the LOG file of the MSDE and used the IP address which was
listed as "listening" for my code.

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.