以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  摄像头 上传照片  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=70999)

--  作者:feifei998
--  发布时间:2015/7/2 23:56:00
--  摄像头 上传照片
想实现一按钮,具有照相功能,把所照图片,上传至sql server表中。表A 第一列

Dim c As new camera
c.capture() \'开始照相
If c.image IsNot Nothing Then \'照相成功
    c.Save("d:\\123456789\\abc.jpg") \'保存文件

    Dim ftp As new FTPClient
    ftp.Host = "222.***.***.***"
    ftp.Account = "**"
    ftp.Password = "**"

If ftp.Upload("d:\\123456789\\abc.jpg","\\123\\123.jpg") = True Then
 
End If
End If




--  作者:大红袍
--  发布时间:2015/7/3 9:51:00
--  
Dim c As new camera
c.capture() \'开始照相
If c.image IsNot Nothing Then \'照相成功
    c.Save("d:\\test.jpg") \'保存文件
   
    Dim ftp As new FTPClient
    ftp.Host = "222.***.***.***"
    ftp.Account = "**"
    ftp.Password = "**"
    Dim ftpname As String = "/" & Format(Date.Now, "yyyyMMddHHmmss") & ".jpg"
    If ftp.Upload("d:\\test.jpg",ftpname) = True Then
        Tables("表A").Current("第一列") &= IIF(Tables("表A").Current.IsNull("第一列"), "", vbcrlf) & ftpname
    End If
End If