Subject | RE: RES: [IBO] IBO + OCTETS FIELD |
---|---|
Author | Paul Hope |
Post date | 2008-11-19T17:27:04Z |
Bit of a long shot without much knowledge to back it up but . .
could it be the default field trimming that IBO does. Try turning it off,
is it AsRawString or something.
Regards
Paul
could it be the default field trimming that IBO does. Try turning it off,
is it AsRawString or something.
Regards
Paul
> -----Original Message-----
> From: IBObjects@yahoogroups.com
> [mailto:IBObjects@yahoogroups.com] On Behalf Of personalsoft_fabiano
> Sent: 19 November 2008 16:42
> To: IBObjects@yahoogroups.com
> Subject: Re: RES: [IBO] IBO + OCTETS FIELD
>
> > What about if you declare the field TESTE as CHAR(16)?
>
> The problem persists, with a litte difference (the last digit
> receive a #00):
>
> alter table cad1
> drop teste;
>
> alter table cad1
> add teste char(16) character set octets;
>
> Q.SQL.Text := 'update cad1 set teste = :teste where numcad1 =
> 0'; Q.ParamByName('teste').AsString :=
> #$3D#$09#$AB#$34#$EF#$12#$AB#$4E#$8F#$D4#$56#$A9#$1A#$BF#$90#$1A;
> Q.ExecSQL;
>
> SQL> select teste, char_length(teste) from cad1 where numcad1 = 0;
> TESTE CHAR_LENGTH
> ================================ ============
> 3D09AB34EF12AB4E8FD456A91ABF9000 16
>
> I found a way to workaround this, but it´s not an option for
> me, because the SQL instruction in my application is
> auto-generated by a third party library. If i change the
> parameter type to BLOB with a CAST, it works:
>
> Q.SQL.Text := 'update cad1 set teste = cast(:teste as blob
> sub_type 1) where numcad1 = 0';
> Q.ParamByName('teste').AsString :=
> #$3D#$09#$AB#$34#$EF#$12#$AB#$4E#$8F#$D4#$56#$A9#$1A#$BF#$90#$1A;
> Q.ExecSQL;
>
> SQL> select teste, char_length(teste) from cad1 where numcad1 = 0;
> TESTE CHAR_LENGTH
> ================================ ============
> 3D09AB34EF12AB4E8FD456A91ABF901A 16
>
> I think it is a bug, probably related to the way IBO copy the
> string value to a statement parameter.
>
> Can someone confirm this?
>
> Regards,
>
> Fabiano
>
>
> ------------------------------------
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> ! Yahoo! Groups Links
>
>
>