CSDN论坛 > VB > 网络编程

高分请教:如何用VB上传一个Access文件到Ftp后,启动一个程序将上传的文件记录转换到My Sql数据库中???分布够可以再加!! [问题点数:100分,结帖人huiyuehuiyue]

Bbs1
本版专家分:0
结帖率 100%
CSDN今日推荐
Bbs3
本版专家分:547
Bbs1
本版专家分:0
Bbs6
本版专家分:5975
Bbs4
本版专家分:1529
Bbs3
本版专家分:538
匿名用户不能发表回复!
其他相关推荐
vb inet 实现的ftp文件的上传下载
用vb 的inet控件 实现的ftp服务器上的文件的上传和下载功能
笔记12:VB.net中的FTP操作:创建、删除、查询、下载、上传
FtpWebRequest与FtpWebResponse类用来与特定FTP服务器进行沟通。     FtpWebRequest 与 FtpWebResponse 类分别继承了 WebRequest 与 WebRequest。         FtpWebRequest负责将指令传送至FTP服务器;         FtpWebResponse则封装服务器所返 回的消息。     F
VB FTP上传下载
'模板: Option Explicit Public Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _ (ByVal sAgent As String, ByVal LAccessType As Long, ByVal sProxyName As String, _ ByVal SProxyBypass As String, ByVal lFlags As Long) As Long Public Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _ (ByVal hInternetSession As Long, ByVal sServerName As String, _ ByVal nServerPort As Integer, ByVal sUsername As String, _ ByVal sPassword As String, ByVal lService As Long, _ ByVal lFlags As Long, ByVal lContext As Long) As Long Public Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" _ (ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, _ ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean, _ ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, _ ByVal dwContext As Long) As Boolean Public Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" _ (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, _ ByVal lpszRemoteFile As String, ByVal dwFlags As Long, _ ByVal dwContext As Long) As Boolean Public Declare Function FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA" _ (ByVal hFtpSession As Long, ByVal lpszFileName As String) As Boolean Public Declare Function FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA" _ (ByVal hFtpSession As Long, ByVal lpszExsiting As String, ByVal lpszNew As String) As Boolean Public Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer Public Declare Function FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA" _ (ByVal hFtpSession As Long, ByVal lpszSearchFile As String, _ lpFindFileData As WIN32_FIND_DATA, ByVal dwFlags As Long, _ ByVal dwContent As Long) As Long Public Declare Function InternetFindNextFile Lib "wininet.dll" Alias "InternetFindNextFileA" _ (ByVal hFind As Long, lpvFndData As WIN32_FIND_DATA) As Long Public Type FILETIME dwLowDateTime As Long dwHighDateTime As Long End Type Public Type WIN32_FIND_DATA dwFilAttributes As Long ftCreationTime As FILETIME ftLastAccessTime As FILETIME ftLastWriteTime As FILETIME nFileSizeHigh As Long nFileSizeLow As Long dwReserved0 As Long dwReserved1 As Long cFileName As String * 260 cAlternate As String * 14 End Type Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long Type OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type '窗体: Private Sub Command1_Click() 'FTP下载 lnginet = InternetOpen(vbNullString, INTERNET_OPEN_TYPE_PRECONFIG, _ vbNullString, vbNullString, 0&) If lnginet Then lnginetconn = InternetConnect(lnginet, "219.131.192.243", 0, _ "posui", "djposui", 1, 0, 0) If lnginetconn Then blnRC = FtpGetFile(lnginetconn, "/load.txt", "c:\load.txt", 0, 0, 1, 0) If blnRC Then MsgBox "download ok!!!" End If InternetCloseHandle lnginetconn InternetCloseHandle lnginet MsgBox "close ok!!!" Else MsgBox "can't connect" End If Else MsgBox "ftp wrong" End If End Sub Private Sub Command2_Click() 'FTP上传 lnginet = InternetOpen(vbNullString, INTERNET_OPEN_TYPE_PRECONFIG, _ vbNullString, vbNullString, 0&) If lnginet Then lnginetconn = InternetConnect(lnginet, "219.131.192.243", 0, _ "administrator", "vai8888", 1, 0, 0) If lnginetconn Then blnRC = FtpPutFile(lnginetconn, "c:\1.txt", "/1.txt", 0, 0) If blnRC Then MsgBox "download ok!!!" End If InternetCloseHandle lnginetconn InternetCloseHandle lnginet MsgBox "close ok!!!" Else MsgBox "can't connect" End If Else MsgBox "ftp wrong" End If End Sub 方法2: '部件INET Private Sub Command1_Click() Me.Inet1.Execute Me.Inet1.URL, "send c:\11.txt /1.txt" '保存 End Sub Private Sub Command2_Click() Me.Inet1.Execute Me.Inet1.URL, "get /2.txt c:\2.txt" '下载 End Sub
有关SQL 数据库自动备份,ftp 定期执行自动上传bak文件到远程服务器记录
  2017年病毒爆发严重,我们公司几个外建项目都受到了不同程度的攻击,最为严重的是其中一个系统的应用服务器和数据库服务器都被攻陷,所有的文件系统不可使用,导致系统崩溃并无法恢复;  系统设计:应用服务器和数据库服务器使用双机互备,定期备份系统的数据库文件;一般能应付其中一台服务器宕机后可以在短时间内恢复系统运行;但遇到双机都被攻陷的情况下,导致系统完全瘫痪并数据无法恢复。所以我们采用了远程备份的...
使用FileUpload上传文件并向数据库插入一条记录
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConflictDetection="CompareAllValues" ConnectionString=""   InsertComma
命令行登陆ftp并上传文件全过程
一时找不到ftp客户端,又懒得下载,顺便熟悉一下命令行......ps. CSDN的blog为什么不能上传文件了??郁闷中......update:[转] FTP命令详解    
java ftp 上传下载(写入自定义字符串)
JAVA中使用FTPClient上传下载         在JAVA程序中,经常需要和FTP打交道,比如向FTP服务器上传文件、下载文件,本文简单介绍如何利用jakarta commons中的FTPClient(在commons-net包中)实现上传下载文件。         前提是在win7系统中搭建好了ftp服务器 一、上传文件          原理就不介绍了,大家直接看代码
VB把excel数据导入ACCESS
Dim SQL As String Dim conn As ADODB.Connection Set conn = New ADODB.Connection Dim Constr As String Constr = "PROVIDER = Microsoft.Jet.OLEDB.4.0;" & "Data Source=c:\db.mdb" conn.Open Constr SQL
如何用FTP软件上传网站文件
 1、ftp不是用来进入数据库,ftp用户名和密码是用来上传网站用的(比如,你的某个页面做了修改,这个时候就要用到ftp来上传),那就要有ftp,你可以在网上下载,leapftp flashfxp cuteftp,一般就这三种,你在ftp输入用户名和密码,就可以上传网页了(如果你不知道你网站的ip,你可以点击开始-运行-然后输入cmd,在弹出的对话框输入ping 你的网站的域名,出来的i
linux 上使用ftp上传文件
1.输入 ftp  切换到ftp命名界面 2.输入 open 20.5.193.236(这里具体是你要连接的ftp地址) 然后输入用户名和密码 3.通过dir查看当前的目录和文件列表 ls只显示文件列表 4.输入mkdir 可以在服务器上新建目录 cd可以进入指定目录 5.输入 !dir 显示服务器本地文件列表 6.输入bin 加快上传速度 7.输入put  filename 上传指定
关闭