以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求纠正本地视频拍照后自动上传到远端代码错误问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=54920) |
-- 作者:李孝春 -- 发布时间:2014/8/7 12:27:00 -- 求纠正本地视频拍照后自动上传到远端代码错误问题 Dim r As Row=Tables("订单编码.客户资料").Current Dim c As new camera c.capture() \'开始照相 Dim s As String = r("身份证号") & "正面摄像" & Date.today & ".gif" c.Save(ProjectPath & "\\Attachments\\" & s) \'照片复制到Attachments目录 If c.image IsNot Nothing Then \'照相成功 r("身份证正面图") = s End If Dim ftp1 As New FtpClient ftp1.Host="192.168.100.16" ftp1.Account = "123456" ftp1.Password = "123456" If ftp1.Upload(ProjectPath & "\\Attachments\\" & s,"\\gzsqykj") = True Then 红色部分代码貌似有故障 修纠正 修正后期待到时候程序在其他网络点打开后 这个对应的图片能够自动下载更新 Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If 运行错误如下: .NET Framework 版本:2.0.50727.5477 Foxtable 版本:2014.7.26.1 错误所在事件:窗口,客户资料,Button4,Click 详细错误信息: 未能找到路径“C:\\Users\\Administrator\\Desktop\\信捷项目\\Attachments\\正面摄像2014\\8\\7.gif”的一部分。 [此贴子已经被作者于2014-8-7 12:27:33编辑过]
|
-- 作者:有点甜 -- 发布时间:2014/8/7 14:02:00 -- 改两句
Dim s As String = r("身份证号") & "正面摄像" & format(Date.today, "yyyyMMdd") & ".gif"
If ftp1.Upload(ProjectPath & "\\Attachments\\" & s,"\\gzsqykj\\" & s) = True Then |
-- 作者:李孝春 -- 发布时间:2014/8/7 14:06:00 -- 回复:(有点甜)改两句?Dim s As String = ... 有点田老师 目前我改成了如下代码: Dim r As Row=Tables("订单编码.客户资料").Current Dim c As new camera c.capture() \'开始照相 Dim s As String = r("身份证号") & "正面摄像" & Date.today & ".gif" c.Save(ProjectPath & "\\Attachments\\" & s) \'照片复制到Attachments目录 If c.image IsNot Nothing Then \'照相成功 r("身份证正面图") = s Dim ftp1 As New FtpClient ftp1.Host="192.168.100.216" ftp1.Account = "123" ftp1.Password = "123" If ftp1.Upload(ProjectPath & "\\Attachments\\" & s ,"\\gzsqykj\\ & s") = True Then Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If End If 提示成功上传 但是在图片浏览器中无法显示对应的图片 在图片控件中可以显示 求解! [此贴子已经被作者于2014-8-7 14:36:22编辑过]
|
-- 作者:有点甜 -- 发布时间:2014/8/7 14:13:00 -- 你看看表里的值是什么?必须是如下这种路径
gzsqykj\\20140807.gif [此贴子已经被作者于2014-8-7 14:13:11编辑过]
|
-- 作者:李孝春 -- 发布时间:2014/8/7 14:35:00 -- 回复:(有点甜)?你看看表里的值是什么?必须是... 路劲如下: 求解! 现在代码调整如下: Dim r As Row=Tables("订单编码.客户资料").Current Dim c As new camera c.capture() \'开始照相 Dim s As String = r("身份证号") & "正面摄像" & Date.today & ".gif" c.Save(ProjectPath & "\\Attachments\\" & s) \'照片复制到Attachments目录 If c.image IsNot Nothing Then \'照相成功 r("身份证正面图") = "\\gzsqykj\\" & s Dim ftp1 As New FtpClient ftp1.Host="192.168.100.216" ftp1.Account = "123" ftp1.Password = "123" If ftp1.Upload(ProjectPath & "\\Attachments\\" & s ,"\\gzsqykj\\ & s") = True Then Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If End If [此贴子已经被作者于2014-8-7 14:37:09编辑过]
|
-- 作者:有点甜 -- 发布时间:2014/8/7 15:15:00 -- 你试试写成这样
r("身份证正面图") = "gzsqykj\\" & s
或者这样
r("身份证正面图") = s |
-- 作者:李孝春 -- 发布时间:2014/8/7 15:16:00 -- 已经能够同步上传和同步显示照片了 但是对于一张照片没有问题 如果想多张照片那后于的不显示 图片浏览器永远只显示第一张 求解 Dim r As Row=Tables("订单编码.客户资料").Current Dim c As new camera c.capture() \'开始照相 Dim s As String = r("身份证号") & "正面摄像" & Date.today & ".gif" c.Save(ProjectPath & "\\remotefiles\\" & s) If c.image IsNot Nothing Then \'照相成功 r("身份证正面图") = s Dim ftp1 As New FtpClient ftp1.Host="192.92.100.16" ftp1.Account = "123" ftp1.Password = "123" If ftp1.Upload(ProjectPath & "\\remotefiles\\" & s ,"\\gzsqykj\\ & s") = True Then Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If End If 对于只有一张图片来说 这个正常了 但是对于想多拍几张图 那问题又来了 因为他永远只显示第一次拍的 之后拍的不显示 |
-- 作者:Bin -- 发布时间:2014/8/7 15:20:00 -- Dim s As String = r("身份证号") & "正面摄像" & format(Date.now,"yyyyMMddHHmmss") & ".gif" |
-- 作者:有点甜 -- 发布时间:2014/8/7 15:28:00 -- 代码
Dim r As Row=Tables("订单编码.客户资料").Current |
-- 作者:李孝春 -- 发布时间:2014/8/7 15:35:00 -- 回复:(Bin)Dim s As String =... 代码更改如下: 运行效果在本地本电脑操作没有问题 但是在另外一个地方打开这个客户端 想同步显示信息的时候 图片不能显示 求解
Dim r As Row=Tables("订单编码.客户资料").Current Dim c As new camera c.capture() \'开始照相 Dim s As String = r("身份证号") & "正面摄像" & format(Date.now,"yyyyMMddHHmmss") & ".gif" c.Save(ProjectPath & "\\remotefiles\\" & s) If c.image IsNot Nothing Then \'照相成功 r("身份证正面图") = s Dim ftp1 As New FtpClient ftp1.Host="192.92.100.16" ftp1.Account = "123" ftp1.Password = "123" If ftp1.Upload(ProjectPath & "\\remotefiles\\" & s ,"\\gzsqykj\\ & s") = True Then Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If End If |