Subject Re: [firebird-support] Right-padded char fields?
Author Olivier Mascia
Le 02-sept.-08 à 15:54, Ivan Prenosil a écrit :

> (Because you can allocate smaller buffer, provided you set its length
> in sqlvar structure appropriately. You can even change datatype
> and let FB do conversion for you, e.g. fetch integer data into varchar
> buffer, which then must be longer that 4 bytes.)

Oops, I was unaware of that capability to alter the datatype and let
FB do the conversion. I'll definitely have to test that extensively,
it opens the way to some less code for type conversion outside.

> ...
> or you can let FB return that length using VARCHAR format
> by single line of code which chages
>
> xsqlda^.sqlvar[col].sqltype := ...

That sounds the way to go. I didn't captured your idea at your first
post, not being aware of the above embedded coercion.

Thanks a lot Ivan!

--
Olivier Mascia
T.I.P. Group S.A.
http://www.tipgroup.com