Foxtable(狐表)用户栏目专家坐堂 → 当前块中已声明了局部变量


  共有1685人关注过本帖树形打印复制链接

主题:当前块中已声明了局部变量

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/7/12 9:02:00 [显示全部帖子]

Dim ftp1 As New FtpClient
ftp1.Host="172.16.1.1"
ftp1.Account = "admin"
ftp1.Password = "Admin"
ftp1.UTF8=True

If Tables("自助报障记录表").Current.IsNull("问题描述附件")=False Then
    If ftp1.DeleteFile("\各表附件\自助报障记录表\" & CurrentTable.Current("问题描述附件")) = True Then
        Messagebox.show("截图删除完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Else
        Messagebox.show("截图删除失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    End If
End If

 

 


Dim str_serialno As String =  e.Form.Controls("TB_日常问题ID").value & "_" & Format(Date.now, "yyMMddhhmmss") & ".jpg"


bit.save(ProjectPath & "RemoteFiles\" & str_serialno)    '保存图片到本地

If ftp1.upload(ProjectPath & "RemoteFiles\" & str_serialno,"\各表附件\自助报障记录表\" & str_serialno)= True Then
    Messagebox.show("截图上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
    Messagebox.show("截图上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
ftp1.Close

 


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/7/12 9:37:00 [显示全部帖子]

弹出这个路径

msgbox(ProjectPath & "RemoteFiles\" & str_serialno)

看弹出的路径,对应的文件是否存在。

 

如果文件存在,就是你ftp的信息输入不正确。执行下面代码,看能否连上ftp

 

Dim ftp1 As New FtpClient
ftp1.Host="172.16.5.89"
ftp1.Account = "administrator"
ftp1.Password = "Admin1234"
ftp1.UTF8=True
ftp1.OpenManager


 回到顶部