Subject Re: API: isc_detach_database, release of resources.
Author nitaligavino <Dan.Crea@apropos.com>
Hi Dimitry,

In your response you mentioned a 2 byte padding, if you will, for
real string length. I'm curious about this, can you explain this in
more detail?

Best regards
Dan Crea


--- In ib-support@yahoogroups.com, "Dimitry Sibiryakov" <SD@t...>
wrote:
> On 27 Jan 2003 at 19:45, Henrik Sitter wrote:
>
> >switch(type) // Process each XSQLVAR parameter structure here.
> >case SQL_VARYING:
> > var->sqldata = new char[(var->sqllen];
>
> There must be 'new char[(var->sqllen+2)];' because SQL_VARYING
> storage includes two bytes for real string length that are not
> counted in sqllen.
>
> >....what happens happens when I call isc_detach_database? I think
the
> >API says that these resources are released. Is that correct?
>
> No. Server-side and internal structures will be released. User-
> allocated resources won't.
>
> SY, Dimitry Sibiryakov.