I'm trying to read a BLOB by doing the following:
string sql =
"SELECT id, added_on, taken_on, caption, description,
width, height, data " +
"FROM image " +
"WHERE id = " + id ;
int imageLen = (int) r.GetBytes(7, 0, null, 0, 0) ;
Log.Debug("imageLen=" + imageLen + " bytes") ;
data = new byte [imageLen] ;
r.GetBytes(7, 0, this.data, 0, imageLen) ;
The first call is supposed to give me the size of the BLOB (when the
buffer is null), based on the docs, and this is what I also do when
working with DB2 and SAPDB.
FireBird is ALWAYS returning 8 as the image length.
Is this a defect in the .NET provider, or am I supposed to do this
differently with FireBird?
I saw an example in the archives where someone simply allocated a HUGE
buffer, and I suppose I _could_ do that, but it seems to be a bit of a
Derek M. A. Lee-Wo
Email: (Home) derek@... (Work) dleewo@...
Fax: (US) 413-826-0641 (UK) 08701 338414
"Those who will not risk cannot win" - John Paul Jones