这是我目前的代码:
MySqlConnection.Open()
command.Connection = MySqlConnection
command.CommandText = "select * from add_document"
READER = command.ExecuteReader
READER.Read()
Dim filebytes() As Byte = CType(READER(1), Byte())
Dim FStream As New FileStream(READER(0).ToString, FileMode.Create, FileAccess.Write)
FStream.Write(filebytes, 0, filebytes.Length)
FStream.Close()
MessageBox.Show("File Retrieved")
我收到以下异常:
无法将类型为system.string'的对象强制转换为'system.byte []