size problem with ole object data type (blob) and ado.net
From: Pierre-Benoit (quertonp_at_hotmail.com)
Date: 04/27/04
- Next message: Daniel Pratt: "Re: How to clone forms and navigate PREV-NEXT-OKAY-CANCEL"
- Previous message: Bassem: "Cannot apply indexing with [] to an expression of type 'object'"
- Next in thread: Miha Markic [MVP C#]: "Re: size problem with ole object data type (blob) and ado.net"
- Reply: Miha Markic [MVP C#]: "Re: size problem with ole object data type (blob) and ado.net"
- Reply: Trent Millar: "Re: size problem with ole object data type (blob) and ado.net"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Daniel Pratt: "Re: How to clone forms and navigate PREV-NEXT-OKAY-CANCEL"
- Previous message: Bassem: "Cannot apply indexing with [] to an expression of type 'object'"
- Next in thread: Miha Markic [MVP C#]: "Re: size problem with ole object data type (blob) and ado.net"
- Reply: Miha Markic [MVP C#]: "Re: size problem with ole object data type (blob) and ado.net"
- Reply: Trent Millar: "Re: size problem with ole object data type (blob) and ado.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|