老师:下面这段代码出错了,“图像上传”没有数据:
Dim lstbox As WinForm.ListBox = e.Form.Controls("zjListBox1")
For Each flt As String In lstbox.Items
Dim ndr As Row = Tables("桩基资料.图像").AddNew
Dim fdr As DataRow = DataTables("桩基资料").Find("图像编号 = '" & ndr("图像编号") & "'")
If fdr IsNot Nothing Then
If fdr.IsNull("桩位编号") Then
MessageBox.Show("请先输入桩位编号!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = True
Else
Dim fl As String = FileSys.GetName(flt)
fl = fdr("桩位编号") & fdr("施工工序") & ".jpg"
ndr("图像名称") = fl
ndr.Save '必须先保存
ndr.DataRow.SQLInsertFile("图像上传",fl) '插入文件
ndr.DataRow.SQLSetValue("CRC值", CRCCheckFile(fl)) '保存crc检验值
End If
End If
Next
[此贴子已经被作者于2018/4/19 23:46:30编辑过]