Dear all,
I wan to read an image from the database via NHibernate.
The description in the XML Files is
Code:
<property name="_Image" type="BinaryBlob" olumn="img_catalog_picture" access="field"/>
In my VB.NET class, the declaration is
Code:
Public Property Image() As System.Drawing.Image
Get
If Not IsNothing(_Image) Then
Dim tmpMemoryStream As System.IO.MemoryStream = New System.IO.MemoryStream(_Image)
Dim tmpImage As System.Drawing.Image
Return tmpImage.FromStream(tmpMemoryStream)
Else
Return Nothing
End If
End Get
I can't read the image because I Have the following error message:
Exception Text:
Quote:
NHibernate.ADOException: problem in find ---> System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
Someone can help me please ?
Thanks in advance