-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem fetching a binary blob from a postgreSQL database
PostPosted: Thu Sep 29, 2005 10:37 am 
Newbie

Joined: Thu Sep 29, 2005 10:11 am
Posts: 1
Hy!

Database: PostgrSQL 8.0
Dataprovider: npgsql 0.7.1

Storing a .Net byte Array (NHibernate Type: BinaryBlob) into the Database (Database type: bytea) works without problems.

But when I m trying to fetch this BinaryBlob out of the database the followed eception is thrown:
ADOException
{"Destination array was not long enough. Check destIndex and length, and the array's lower bounds."}

The interestring thing is, that this exception ocours only with "bigger" files up to 10kbyte.



I have no idea what the problem is.
I hope anybody can help me.

Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 29, 2005 3:48 pm 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
This might as well be a problem in the Npgsql driver. If I remember well, NHibernate reads binary data in small chunks, but in the past, Npgsql didn't do anything with that and tried to pass the entire byte array in one time.

You can allways go and ask the Npgsql guy(s) about this. Francisco is one of the most helpful guys in OS land.

_________________
Cuyahoga


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.