Hello!
I have an OLE Object in my table, that may be jpg, doc, xml file.
In case of jpg I'd like to show it (VS2005 Visual basic).
I did next (not full code):
Dim ms AsNew MemoryStream()
Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess)
reader.Read()
retval = reader.GetBytes(0, 0, outbyte, 0, bufferSize)
ms.Write(outbyte, 0, retval)
ms.Seek(0, SeekOrigin.Begin)
curImage = Image.FromStream(ms,False)----> error "Parameter is not valid."
I do not see the fault. Please help
I have an OLE Object in my table, that may be jpg, doc, xml file.
In case of jpg I'd like to show it (VS2005 Visual basic).
I did next (not full code):
Dim ms AsNew MemoryStream()
Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess)
reader.Read()
retval = reader.GetBytes(0, 0, outbyte, 0, bufferSize)
ms.Write(outbyte, 0, retval)
ms.Seek(0, SeekOrigin.Begin)
curImage = Image.FromStream(ms,False)----> error "Parameter is not valid."
I do not see the fault. Please help