Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]图片存储

1楼
江南小镇 发表于:2024/1/10 10:49:00
老师好,下面代码为什么会在水电气抄表图片文件夹外都复制一张图片。

If Tables("水电气数据记录").Current Is Nothing Then
    Return
End If
Dim dr As DataRow = Tables("水电气数据记录").Current.DataRow
Dim dlg As New OpenFileDialog
dlg.Filter = "图形文件|*.bmp;*.jpg;*.gif;*.png"
If dlg.ShowDialog = DialogResult.OK Then
    dr.SQLInsertFile("总表",dlg.FileName) '插入文件
    Dim pic As WinForm.PictureBox = e.Form.Controls("BBB1")
    pic.Image = GetImage(dlg.FileName)
    FileSys.CopyFile(dlg.FileName, "H:\能源管理\Attachments\图片管理\水电气抄表图片\" & FileSys.GetName(dlg.fileName),True)
Tables("电气数据记录").Current("总表名称") = FileSys.GetName(dlg.fileName)
End If
2楼
有点蓝 发表于:2024/1/10 10:56:00
msgbox("H:\能源管理\Attachments\图片管理\水电气抄表图片\" & FileSys.GetName(dlg.fileName)) 显示的路径是否正确,如果正确可能有其它代码影响
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02734 s, 2 queries.