• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2223
  • Last Modified:

FTP using docmd.transferdatabase

I wish to transfer information from an office based MS Access database to/from a database located on an externally hosted web server to which I only have FTP access.

I think I can probably use the Microsoft Internet transfer control (msinet.ocx) to do the transfer via FTP but would prefer to keep things as simple as possible.

What I would like to know is if it is possible to use the DOCMD.TRANSFERDATABASE command to transfer information via FTP and if so what is the syntax for specifying the remote database in the command?

1 Solution
Im not aware u can do that, you can copy from machine to machine using TransferDatabase but then these two machines would be networked

I would imaging exporting table as csv, ftp it across them import into new table

u can find examples on using WinInet here

ITC is about your only solution...but your ftp idea isn't likely to work if you are trying to update the db...

what i use to update my web db is something like this

access form fills variables in an ITC url string or form variable
the url is a coldfusion page (but could be asp, php or whatever) which triggers a db insert or update and passes back the result of the insert to ITC for user feedback

i suppose what you could try is to ftp the data to a dir and then trigger something to import the data via some server sided scripting...

Gustav BrockCIOCommented:
This is off-line updating of data. If you are thinking of a "live" connection with some sort of linking tables from the external database, it is not possible as far as I know; you need either a drive letter or UNC path to link tables and - even if you could - it would be very slow.

As you only need to transfer one file, the easiest way is to export your selected data to a new database and then send that via FTP to your web-server to replace the old file.
However, if you need indexing of some tables in the database to transfer, you'll have to create these from your application either via VBA code or by SQL after the transfer.
If this sounds to much, you can create a master database with all the tables and indexes you need but without data. Then make a copy of this each time you will transfer data, link the tables from it, and fill it with data by running an appending query for each table.

If you need to import as well, download the file and link the tables to your application and run update or append queries as needed.

For the FTP transfer you can look up a bunch of solutions around with either a bunch of code or using third party ActiveX controls. For sending a single file, I use WCL_FTP (free) for which you can download a module for Access - it's nearly a plug-in and go:


Note the link on that page to the Access module.
This offers the user a small status windows to watch.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now