On 18/04/2017 11:40, Jiří Činčura wrote:
>> You should call setLength and setScale (if necessary) too.
> Ah, that's what I was missing. Isn't there a constant for i.e.
> SQL_TIMESTAMP? Because it's always 8 bytes, but feels wrong to hardcode
> it manually myself.

There is no constants, in C/C++ some sizeof may be possible.

The data passed to these methods are still old kind of data not mapped
to the new APIs.


> Also going from SQL_TEXT to SQL_VARYING should be possible, right? How
> I'm going to handle the length here. I don't know the real length of the
> string, do I?
>
I always do it.

See fixMetadata here in the Node.js driver.

https://github.com/asfernandes/node-firebird-driver-native/blob/master/src/lib/fb-util.ts


Adriano


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to