Subject | RE: [Firebird-Architect] The Wolf on Firebird 3 |
---|---|
Author | Claudio Valderrama C. |
Post date | 2005-11-08T03:12:28Z |
> -----Original Message-----Ah, do you mean deallocating and allocating from the heap specifically for
> From: Firebird-Architect@yahoogroups.com
> [mailto:Firebird-Architect@yahoogroups.com]On Behalf Of Jim Starkey
> >
> >Suppose my program prepares a statement, specifically a query.
> >How does it determine how much memory it should allocate for
> buffers if the
> >only answer from the server is "this is a string", for example?
> >
> ResultSet::getString returns a null terminated string. You use it,
> assign it to a string class, and copy it before the next "next()". You
> don't worry about the length. It's a string.
each fetch?
If I'm getting a varchar, with the old schema I simply truncate at
vary_string[vary_length]
and keep the same buffer for all the recordset
whereas with the new, I get a C char, have to apply strlen, allocate
strlen+1 bytes and transfer the information. Is this the way you devised it?
Second, how does a char* based interface deal with anything more than ASCII,
considering that not only data but identifiers (whatever object names) can
be expressed in any supported language?
Third, the C string is totally useless for retrieving binary information,
namely OCTETS charset. Do you have an alternative call?
C.