Simplicty and flexibility!

How to exceed 255 character limit

Started by Sam Bird
You will need to Sign In to be able to add or comment on the forum!

How to exceed 255 character limit

Need to create a dynamic text string in a memo or text field based on multiple variable user inputs.
The total characters concatenated can exceed 255 characters.
Concat, Jointext & joinstrings all have a 255 character limit.
Is there any way of returning a string with more than 255 characters?

Written by Sam Bird 21/12/22 at 22:28:08 Dataease [{8}]FIVE

Re:How to exceed 255 character limit

Hi Sam.

Yes, you are butting your head against a limitation that has been the same since DFD.

In 8.x we did a lot of work where you could manipulate Memos with a full library of Memo specific functions as it has been a "truth" in DataEase/Ffenics circles that the 255 boundary was "impossible" to work around.

As it turns out it isn't.

In LE9/DE9 onwards there is no longer any practical difference between text/memo which render the above function obsolete as you can simply use the good old trusted concat(),firstc(),lastc(),stringfind(),stringreplace() etc. 
The theoretical limit in LE9/DE9 is 4GB which is not a small increase in this incapacitating limit but an increase which is no less than 1684300900% or in laymans terms a bit over 1.5 billion %.

To be honest if there was no other reason to move to LE9/DE9 (there is plenty) this should be reason enough. 

Suddenly you can work with large texts as you please. concatenate memos, with texts, number, replace, insert large text into a wireframe, build an entire website in memory and publish it....

Only the imagination is the limitation here.

Written by DataEase 22/12/22 at 14:03:48 Dataease [{8}]FIVE

Re:Re:How to exceed 255 character limit

Ok, that sounds great for DE9.
...for DE6 or DE8 it's still an issue. 

I did find one way of getting around this although it does have it's kinks.
An Import spec from file will allow for more than 255 characters if it is set to add all records. If the import is set to update existing then it does not work.

Written by Sam Bird 23/12/22 at 10:06:14 Dataease [{8}]FIVE

Re:Re:Re:How to exceed 255 character limit

The issues that has always been there will always be there as both are out of support.

However in DE8.5 you can use the Memo functions to get around these problems but it is more awkward than simpy using the string functions directly in the code.

LE9/DE9 also have memo as variable in DQL.

Define "MyBigString" Memo .

MyBigString := concat(Memo,"/CRThis is a test/CR",TextField,StringBetween(AMemo,"<header>","</header")) .


Written by DataEase 23/12/22 at 15:33:21 Dataease [{8}]FIVE