----- Original Message -----
From: "Nick Upson" <nick.upson@...>
To: "firebird-support" <firebird-support@yahoogroups.com>
Sent: Friday, October 06, 2006 10:25 AM
Subject: [firebird-support] octets handling
>I need to construct a string, within an SP and preserve all values,
> including nulls.
>
> declare variable payload Char(29) character set OCTETS;
> declare variable i1 Integer;
> declare variable i2 Integer;
> declare variable i3 Integer;
> declare variable i4 Integer;
>
> i1 = 6;
> i2 = 0;
> i3 = 60;
> i4 = 1;
>
> payload = ascii_char(i1) || ascii_char(i2) || ascii_char(i3) ||
> ascii_char(i4);
>
> results in payload = '063C00000...'
>
> whereas I would expect & need '06003C01000...'
>
> I thought that putting everything into an octets field would avoid the
> db chopping at null but it's still not correct either.
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>