11.02.2012 20:49, Mark Rotteveel wrote:

> * Is the size being allocated for SQL_TEXT right? It is allocating
> sqllen + 1 and null-terminating it, while looking at the Interbase 6
> ApiGuide they are always allocating sqllen and not null-terminating

You don't have to null-terminate it, sqllen is enough.

> * Is the size being allocated to data for SQL_VARYING right, shouldn't
> the actual size of the byteArray[1] + 3 (or 2) be sufficient instead of
> sqllen + 3 (especially for UTF8 and for strings shorter than the maximum
> size this is larger than necessary)

length(byteArray) + 2

> * Also is the size + 3 and null-terminating the right course of action
> for SQL_VARYING?

Null-termination is not required.

> * For all datatypes other than SQL_VARYING, it is first storing
> byteArray size and then overwriting that with the byteArray, so actually
> storing that size first is unnecessary, right?

I'm not sure I understand you here.

> * Is 0x20 (space) the right pad char for connection characterset NONE?

Yes.


Dmitry

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to