Hi there!
I'm using an automation to create 2D barcodes.
Every time that the automation returns a text bigger than 250 char the message below pops up.
"The length of the text string exceeds the size of the string buffer."
The text varible shouldn't be 1024char?
Is there any way to handle big text variables?
Thanks in advance!
0
Answers
It is possible you have a variable that is defined as Text250.
Or you want to put it into a field of a table. These are still limited to 250 characters.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks for your reply
The code is above.
ConvBarcode it's a text variable with 1024 of length.
the Encode() Method receives a text variable to convert into PDF417 and returns it as a converted text in hexadecimal chars.
The returned text is something like:
00AB8AC7C530E4F770A8780BAD
00AB857BCB8EE1D7B056780BAD
00AB8A81D4E0EC779578780BAD
00ABA820CBB9E7D6750C380BAD
00AB947DC3A4E643728EF80BAD
00AB850BC87A6052F0A0980BAD
00ABAC63CFACECF2F2C4380BAD
00AB8168C1442814F281080BAD
00AB9640CDB06F971058B80BAD
00ABAE7CC76E2309D2E7180BAD
00AB963DCB17EF70B2C6F80BAD
00ABAEE1D8672750702E680BAD
If the returned text is shorter than 250 chars it goes OK, otherwise the error message pops up.
I dont know how to solve this issue...
You need to try this with a newest executable 5.0 for example. They have increased the size from 250 to 1024.
your text length is 324. So that's why you are getting the error.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Code is limited to 250 chars.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Hi kriki,
ConvBarcode is a text variable with 1024 of length, and thats why it is so strange...
I'm using navision 4.0 SP2. Is this the problem???
Must I upgrade it to 5.0 to solve this issue?
It's weird that i can give this variable a text over 250 char, and if i do the same thing usuing the automation it returns an error.
](*,) ](*,) ](*,)
I can't remember at what version they increased the buffer.
I would just try and copy the code and run it in 5.0 executables. To see if it works.
If it doesn't work then the amount that is returned is greater than 1024 characters. In that case there isn't much you can do.
Even if you get the values through some wrapper, I don't know how you will be able to print the whole barcode if it's greater than 1024 characters.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thank you Kriki,
In oder to solve this issue, I've asked the Barcode software supplier to add a parameter in the dll to "slice" the returned value.
I think that this can solve the problem...
Thanks