![]() |
| ||
| Reading binary data from SPROC..help please... Hi, I'm trying to display an image that's stored in a SQL Server database. The ContentType and binary data are being returned but the image is coming up as a broken image. To test that the data is being retrieved I tried outputting the content type. Response.Write(adm["Image_MIME_type"].ToString()); It is getting the corect data i.e. "image/pjpeg" Then I tried Response.write for the binary data returned Response.Write((byte[])adm["Image_image"]); It is outputting printing "System.Byte[]" Am I right in saying the data is being returned from the SPROC? Here is the code...
|
| ||
| Re: Reading binary data from SPROC..help please... Any help would be great, thanks! |
| ||
| Re: Reading binary data from SPROC..help please... Load the image into a byte array. Pass the byte array into a memory stream Pass the memory stream into a new or existing bitmap.
Error checking, null checking, etc needs to be added, left out for simplicity Jerry |
| All times are GMT -4. The time now is 7:52 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC