-- 请教下列代码在编译后运行到选文件夹“确定”就出错,但在开发状态运行就正常
Dim tb As Table = Tables("主窗口_table10")
If tb.Rows.count < 1 Then
Return
End If
Dim tbr As Row = tb.Current
Dim nr As DataRow = tbr.DataRow
Dim nf As String
Dim nf1 As String
Dim drs As List(Of DataRow)
drs = tb.DataTable.S elect("[选中] =true")
If (tb.Current("选中") = True And drs.Count = 1) OrElse drs.Count = 0 Then
drs = tb.DataTable.Select ("id=\'" & tbr("_Identify") & "\'")
End If
Dim dlg As New FolderBrowserDialog
If dlg.ShowDialog = DialogResult.Ok Then
For Each dr As DataRow In drs
If dr.SQLLoadFile("files", dlg.SelectedPath & "\\" & dr("文件名").trim() & dr("文件名后缀").trim()) = False Then \'如果提取文件失败
Messagebox.Show("附件提取失败,可能并不存在附件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End if
Next
Messagebox.Show(drs.Count & "条 记录下载成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If