Home > Archive > Microsoft SQL Server Desktop Engine > November 2005 > Remote ADP connection to MSDE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Remote ADP connection to MSDE
GAVO-UK

2005-11-16, 7:24 am

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
successfully.

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 Source=xxx.xxx.xxx.xxx,1433;" & _
"Initial Catalog=NorthwindCS;
" & _
"User ID=sa;" & _
"Password=xxxxx"
'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
.Open
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
luck.
Any help would be appreciated
GAVO.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com