Subject | RE: [firebird-support] blob field |
---|---|
Author | Peter Turner |
Post date | 2007-06-11T15:29:36Z |
Got to thinking a bit more....
The reason for the intermediate file would be...
- that part is already written
- a blob is basically a container for a binary object (with
some admin stuff). Having the binary file, I could tell the blob object
the size then read the data right into it - just like the example in
tests.cpp.
since the code is already written for the fprintf's, I was looking to
see if there was something similar for writing to blobs - that's where
the Blob Stream "thingie" came up.
TIA,
pbt.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Milan Babuskov
Sent: Friday, June 08, 2007 6:20 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] blob field
p_b_turner wrote:
http://www.ibpp.org <http://www.ibpp.org>
need and remove
#include "stdio.h"
from the file that uses it.
--
Milan Babuskov
http://www.guacosoft.com <http://www.guacosoft.com>
http://www.flamerobin.org <http://www.flamerobin.org>
[Non-text portions of this message have been removed]
The reason for the intermediate file would be...
- that part is already written
- a blob is basically a container for a binary object (with
some admin stuff). Having the binary file, I could tell the blob object
the size then read the data right into it - just like the example in
tests.cpp.
since the code is already written for the fprintf's, I was looking to
see if there was something similar for writing to blobs - that's where
the Blob Stream "thingie" came up.
TIA,
pbt.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Milan Babuskov
Sent: Friday, June 08, 2007 6:20 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] blob field
p_b_turner wrote:
> Have an application written in C++ that currently writes 19k worth ofThat should be really easy with IBPP:
> formatted data to a file. Need to have a similar function that can
> write (and read) the data to (and from) a blob field in our database.
http://www.ibpp.org <http://www.ibpp.org>
> is it easier to write the data to a temporary file, then back to theProbably not. Depends what you find to be easy.
> blob field?
> I have come across mention of a blob stream writing'Stream' as in std::stream?
> interface, I think by Ann Harrison, but can't find an example.
> would potentially be the best of both worlds, as i'm not lookingPerhaps you could write your own fprintf function that does what you
> forward to migrating all the fprintf's to binary data writes.
need and remove
#include "stdio.h"
from the file that uses it.
--
Milan Babuskov
http://www.guacosoft.com <http://www.guacosoft.com>
http://www.flamerobin.org <http://www.flamerobin.org>
[Non-text portions of this message have been removed]