size problem with ole object data type (blob) and ado.net

From: Pierre-Benoit (quertonp_at_hotmail.com)
Date: 04/27/04


Date: 27 Apr 2004 08:17:03 -0700

Hi there,

I've a strange problem with ado.net and an Access db. I need to create
a little C# app that take the content of "ole object" field and then
save it into a file.

The problem is that when I do the following

Byte[] byteBLOBData = new Byte[0];
byteBLOBData = (Byte[])(ds.Tables["tblRefAlbum"].Rows[0]["photo"]);

I get the exact double of the original size! and if I save this array
byte to a file I'll get my file with every two byte set to 00.

The result is, of course, not an image. I've tryed to manipulate my
array of byte to strip every two bytes but the result is an visible
image but not the correct image (it's a scrambled image that appears).

Please help, I really need to do this exportation of picture in .net
with the access db.

Thanks a lot for people whom can help me.



Relevant Pages

  • size problem with ole object data type (blob) and ado.net
    ... I've a strange problem with ado.net and an Access db. ... a little C# app that take the content of "ole object" field and then ... array of byte to strip every two bytes but the result is an visible ...
    (microsoft.public.dotnet.general)
  • size problem with ole object data type (blob) and ado.net
    ... I've a strange problem with ado.net and an Access db. ... a little C# app that take the content of "ole object" field and then ... array of byte to strip every two bytes but the result is an visible ...
    (microsoft.public.dotnet.languages.csharp)
  • Disappearing Sessions
    ... I'm presently converting a v1.1 ASP.NET app to v2, and am encountering a ... strange problem. ... When running in Debug mode (i.e. hitting F5), ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: size problem with ole object data type (blob) and ado.net
    ... For instance when using the Northwind database you ... _bitmap = new Bitmap; ... > I've a strange problem with ado.net and an Access db. ... > array of byte to strip every two bytes but the result is an visible ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: size problem with ole object data type (blob) and ado.net
    ... For instance when using the Northwind database you ... _bitmap = new Bitmap; ... > I've a strange problem with ado.net and an Access db. ... > array of byte to strip every two bytes but the result is an visible ...
    (microsoft.public.dotnet.framework.adonet)