connect to ADODB on FTP server

Mr Meme

New Member
Joined
Dec 25, 2017
Messages
4
I am using a centralized data base on an FTP server that I need to form a connection to from excel to write, update, and pull data. Thus far I can get this to work when the data base in on my local computer, but once it's on the server I can't open the connection with a macro.

The following is my existing code:

Code:
Sub Button2_Click()
'''test button for adding a new line to access data base
'''this code should be pasted into UFinput/CBSubmit_click() sub when completed


'declare all dementions
Dim cn As New ADODB.Connection, rs As New ADODB.Recordset


'open connection and table in data base
cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data " _
& "Source=NWdrive/Myfolder/Myfile.accdb;Persist " _
& "Security Info=False;"
rs.Open "TblMCIssues", cn, adOpenKeyset, adLockOptimistic

'write data to access data base
With rs
    .AddNew
    .Fields("Date Reported") = Now()
    .Fields("Location") = "User Defined"
    .Fields("Description") = "User Defined"
    .Fields("Equipment") = "User Defined"
    .update
End With

'close connection when all work is completed
rs.Clone
cn.Close

'line to be deleted/altered when coding completed
MsgBox "This code has run successfully", vbOKOnly, "Testing"
End Sub

I have tried to reference the network drive directly
"ftp://ftp.myserver.com/Myfolder/..."
but still no luck, I'm sure it's something simple (as is usually the case for my projects).

Any help in this is greatly appreciated,
Thanks in advance

--It's only hard until you know it, then it's easy...
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
can you map that server as a drive letter ?
 
Upvote 0
Looks like I found my own answer, just in the excel forum...Sadly it seems it's not possible according to xenou :(

HTML:
https://www.mrexcel.com/forum/excel-questions/527903-can-i-pull-data-ftp-server.html
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top