I am just trying to load a sql image field into a .Net image variable.
Suggestions?
Dim Im as Image
Im = cType(SqlDataReader.GetSqlBinary(0), image) 'does not work
or
Dim Im As Image
Dim SqlBinValue As SqlBinary
Dim By As Byte()
SqlBinValue = SqlDataReader.GetSqlBinary(0)
By = SqlBinary.op_Explicit(sqlBinValue)
Im = CType(By, Image) 'does not work
Thanks
Bob
William Ryan eMVP - 31 Mar 2004 19:34 GMT
There's a little more to it than that... this may help you
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
> I am just trying to load a sql image field into a .Net image variable.
> Suggestions?
[quoted text clipped - 15 lines]
> Thanks
> Bob
Bob - 31 Mar 2004 20:52 GMT
Thanks for the help. I'll check it out.
William Ryan eMVP - 31 Mar 2004 21:10 GMT
Bob:
That should do it for you even though it's in access, but if you have any
problems, let me know and I'lll do what I can.
Cheers,
Bill
> Thanks for the help. I'll check it out.