On 28/06/2016 14:45, Jiří Činčura wrote: > OK, you cracked my confidence. The length from metadata is what? > a) length in bytes of declared field > b) length in chars of declared field > c) length of bytes I should read It's (a).
> I supposed it's c) and I was not thinking it could be otherwise. :) And > when I created the string from the bytes - given it's padded because > it's CHAR(x) - I saved the length (for validation user is not providing > string that's too long as a result), so I knew it without computing it. > > From your questions I have a feeling, it's a). And that would indeed > make it way different. > > If so I should change it somewhere in Plugin::makeProcedure? Yes, you should manipulate the builder there. Note that when you change a CHAR to VARCHAR, offsets will be changed and will be different than what was passed by the engine to the IMessageMetadata parameter. So after you change builder properties, call builder.getMetadata to obtain the refreshed offsets. From then, you could just consider the parameter is a VARCHAR. You could see this in Routine.java of FB/Java. Adriano ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
