|
-
Apr 16th, 2002, 04:50 AM
#1
Connect to an online database
Hello everybody. I'm trying to connect to a databse which is online. I tried the following code, but it doesn't work. Does anybody know the answer? Is it even possible to connect to an online database?
code:
Option Compare Database
Private strSQL As String
Private cnnData As New ADODB.Connection
Private rstData As ADODB.Recordset
Private Sub Form_Load()
With cnnData
.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=ftp://server/database.mdb;" & _
"Uid=xxxxxx;Pwd=xxxxxx"
.Open
End With
strSQL = "SELECT * FROM tblMembers"
With rstData
Set .ActiveConnection = cnnData
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open strSQL
End With
Set Me.Recordset = rstData
Me.txLName.ControlSource = "tx_LName"
End Sub
Thankx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|