Dim dlg As new OpenFileDialog
If dlg.ShowDialog = DialogResult.OK Then
Dim ftp1 As New FtpClient
ftp1.Host="127.0.0.1"
ftp1.Account = "test"
ftp1.Password = "test"
If ftp1.Upload(dlg.FileName, "/" & FileSys.GetName(dlg.FileName)) = True Then
Tables("表A").Current("图片1") &= IIF(Tables("表A").Current.IsNull("图片1"), "", vbcrlf) & "/" & FileSys.GetName(dlg.FileName)
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
ftp1.close
End If