MySqlConnection.Open()
command.Connection = MySqlConnection
command.CommandText = "select File_Name,File from add_document where Document_ID = '" & TextBox1.Text & "'"
READER = command.ExecuteReader
READER.Read()
Dim filebytes() As Byte = CType(READER(1), Byte())
Dim FStream As New FileStream(READER(0).ToString, FileMode.CreateNew, FileAccess.Write)
FStream.Write(filebytes, 0, filebytes.Length)
FStream.Close()
MessageBox.Show("File Retrieved")
READER.Close()
MySqlConnection.Close()
End If
这是我的代码,当我在我的数据库中检索文件时,我想选择我要保存的位置(什么文件夹等)。任何帮助将不胜感激