5

I have a requirement to create a simple database in Access to collect some user data that will be loaded into another database for further reporting. There will be a module in the Access db that when invoked by the user (probably by clicking a button) will output a query to a delimited file. The user also needs a mechanism (for example a form with a button) to easily transfer the file to a remote server, using sftp. Does anyone have an idea of how to accomplish this?

5 Answers 5

7

You can simply write a call to the sftp command line client via a batch file if you want to accomplish that.

Check out the Shell() function in VBA.

Under the click event of the button on your form add in the code:

mySFTPCall = "sftp <insert your options here!>"
Call Shell(mySFTPCall, 1)

I've used this before to just copy files straight across network shares etc. to share data from an in-house Access DB. Of course you could get more fancy if necessary.

Sign up to request clarification or add additional context in comments.

3 Comments

If you use ShellAndWait (mvps.org/access/api/api0004.htm) you will know when the script finishes.
@David -- Thanks for the ShellAndWait script idea - I needed that option.
@David - Good call my friend!
2

You can use our SFTPBlackbox (ActiveX Edition).

Comments

0

I would imagine you just need to find an FTP COM object. You should then be able to instantiate this in the Access module code. dart.com has one and I'm sure there are many more (just Google FTP COM).

Comments

0

You could make a shell call to a command line app such as MOVEit Freely, which is freeware, to script secure ftp transfers. I've used it in the past and it has some nice features and worked quite well.

MOVEit Freely is a free command line FTP/secure FTP SSL (FTPS) client for Windows Vista Business Edition, 2003, XP, 2000, ME and NT 4.0 systems.

1 Comment

@CodeSlave True enough. For anyone who's interested here's some good commentary--pros/cons-- of FTPS vs SFTP codeguru.com/csharp/.net/net_general/internet/article.php/…
0

Chilkat has an FTP component that works with COM/ActiveX. It says that it supports FTP over SSL (FTPS), which I think is the same as SFTP. I've used some of their other products before for .Net and they have worked very well. They have a free trial, so you having nothing to lose by downloading and checking if they work for you.

1 Comment

SFTP and FTSP are not quite the same: en.wikipedia.org/wiki/SSH_file_transfer_protocol en.wikipedia.org/wiki/FTPS "FTPS servers must provide a public key certificate."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.