Re: [Firebird-net-provider] Sequential access to blobs

2009-12-22 Thread Jiri Cincura
On Tue, Dec 22, 2009 at 22:47, Jacek Salamon wrote: > is it possible to read blob from the middle? I have no idea, whether protocol supports this. Maybe ask in devel list. -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.cincura.net/ | http://www.ID3renamer.com

Re: [Firebird-net-provider] Sequential access to blobs

2009-12-22 Thread Jacek Salamon
>Sure. Look at BlobBase class. You can rewrite the class to return only >pieces. But don't forgot to close the blob when you're finished. Thanks. ;-) I added an event which is raised after downloading each segment. It passes the segment data and number of downloaded bytes to its subscribing funct

Re: [Firebird-net-provider] Sequential access to blobs

2009-12-22 Thread Jiri Cincura
On Tue, Dec 22, 2009 at 11:24, Jacek Salamon wrote: > So is there any possibility to read BLOB piece by piece? Sure. Look at BlobBase class. You can rewrite the class to return only pieces. But don't forgot to close the blob when you're finished. -- Jiri {x2} Cincura (CTO x2develop.com) http://

Re: [Firebird-net-provider] Sequential access to blobs

2009-12-22 Thread Jacek Salamon
>When you call GetBytes the blob is read completely from underlying >stream. It's not read piece by piece. So is there any possibility to read BLOB piece by piece? Best regards, Jacek Salamon -- This SF.Net email is spon

Re: [Firebird-net-provider] Sequential access to blobs

2009-12-22 Thread Jiri Cincura
On Mon, Dec 21, 2009 at 22:39, Jacek Salamon wrote: > I suppose it should read a BLOB data piece by piece, but it reads the > whole BLOB data and then gets consecutive bytes from it. > It is important for me because I write application that downloads > binary data from a database on a remote serve

[Firebird-net-provider] Sequential access to blobs

2009-12-21 Thread Jacek Salamon
Hello I have a question about Firebird .NET Provider. Does it support sequential reading of BLOB fields? I read BLOB like this way: FbDataReader rd = cmd.ExecuteReader(CommandBehavior.SequentialAccess); rd.Read(); long bytesDownloaded = 0; long j=0; long fileSize = rd.GetBytes(0, 0, null, 0, 0);