[ERROR]The length of the text string exceeds the size string

xina_man
Member Posts: 116
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!
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
-
You should check with the debugger to find the point where it blocks.
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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
kriki wrote:You should check with the debugger to find the point where it blocks.
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.
Thanks for your replyIF NOT ISCLEAR(Barcode) THEN CLEAR(Barcode); CREATE(Barcode); ConvBarcode := Barcode.Encode(Text003); // error break
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...0 -
I'm guessing you are using older clients.
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.0 -
Just a wild guess : "ConvBarcode" is of type code?
Code is limited to 250 chars.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
ara3n wrote:I'm guessing you are using older clients.
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.
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.
](*,) ](*,) ](*,)0 -
Are you sure it's below 1024 characters?
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.0 -
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions