Dim dlg As New OpenFileDialog
dlg.MultiSelect = True
dlg.Filter = "数据表文件|*.doc;*.docx;*.xlsx"
If dlg.ShowDialog =DialogResult.OK Then
for each fl As String in dlg.FileNames
Dim r As Row = Tables("fa piao填开库存表.填开fa piao附件数据表").AddNew()
r("文件名称") = FileSys.GetName(fl) '写入文件名
r.Save '必须先保存
r.DataRow.SQLInsertFile("附件",fl) '插入文件
r.DataRow.SQLSetValue("CRC值", CRCCheckFile(fl)) '保存crc检验值
next
End If