If Tables("管理.附件").Current Is Nothing Then
Return
End If
Dim dr As DataRow = Tables("管理.附件").Current.DataRow
Dim fl As String = ProjectPath & dr("文件名")
If FileSys.FileExists(fl) AndAlso CRCCheckFile(fl) = dr.SQLGetValue("CRC值") Then '如果本地存在同名文件且CRC校验值相同
'则直接使用本地文件
Else '否则从数据库提取文件
If dr.SQLLoadFile("附件",fl) = False Then '如果提取文件失败
Messagebox.Show("附件提取失败,可能并不存在附件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
End If
Dim Proc As New Process '打开文件
Proc.File = fl
Proc.Start()
求教下,用这代码提取文件,默认是保存在项目的文件夹里,我想知道要怎么做才能让文件保存到其他文件夹,或者能够设置保存路径