如何MS Access数据库模块内使用SFTP的? [英] How to use sftp from within an MS Access database module?

查看:164
本文介绍了如何MS Access数据库模块内使用SFTP的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有要求在Access中创建一个简单的数据库来收集将被装入用于进一步报告的另一个数据库中的一些用户数据。会有分贝,该访问模块时由用户调用(可能通过点击按钮)将输出一个查询以分隔的文件。用户还需要一个机构(例如一个按钮形式)容易地将文件传输到远程服务器,通过SFTP。有没有人对如何做到这一点的想法?

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?

推荐答案

您可以简单地通过一个批处理文件,如果你想实现这一目标写入调用SFTP的命令行客户端。

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

退房Shell()函数在VBA。

Check out the Shell() function in VBA.

在窗体上按钮的单击事件中的code补充:

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

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

我用这个之前只是复制径直穿过网络共享等文件,以从内部Access数据库共享数据。当然,你可以得到更看中的,如果有必要的。

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.

这篇关于如何MS Access数据库模块内使用SFTP的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆