Simplicty and flexibility!


Length of text field


Started by Karen Miller
Search
You will need to Sign In to be able to add or comment on the forum!

Length of text field

Good Morning,

In DataEase 8.5. When creating a text field, what is the maximum length I can make this field? Is it still 255?


Written by Karen Miller 27/04/17 at 15:25:21 Dataease [{8}]FIVE

Re:Length of text field

HI.

No. The maximum length of a text field is 4080.

And the maximum length of a Memo field is 4 Mb.

However there are some limitations as most functions in DataEase will only accept arguments of 255 and return a maximum of 255.

For Memo we have solved this by developing Memo specific functions like MemoCopy() MemoReplace() MemoFind() etc..

If you for instance concatinate two fields that are 2000 characters long in a third field that are 4000 characters long the result will be disappointing with only 255 characters as the result of concat() or Jointext.

As we are constantly developing DataEase we have already found a way around this limitation so in the next version of DataEase it will be removed for all text functions.


Written by DataEase 27/04/17 at 15:26:20 Dataease [{8}]FIVE

Re:Re:Length of text field

On the current form I have 2 fields at 255 each. When I add to the same form a text field of 800 I receive the following dialog box.

"This data value is invalid". I don't understand the problem. Have I maxed out Text fields for the form? Doesn't seem right.


Written by Karen Miller 28/04/17 at 13:57:00 Dataease [{8}]FIVE

Re:Re:Re:Length of text field

Nobody around here have ever come across this error message ;-)

We had the developers dig a little and they say it is basically a Runtime message relating to the wrong value trying to be stored in a field.

As you are working with text fields that are larger than 255 it is most likely related to the fields having been created as less than 255 and then updated to above 255.

The way this is done is an old DataEase "hack" of merging serveral text fields into one control.

If you have many fields that started life as less than 255 and then was updated to more than 255 there can be a problem with the order of the dependent files.


The best advice here is to use Memo's instead of Large text fields or create the text fields from scratch to the size you want them.

We are currently re-working larger text fields/memos for the next release but it won't help you now.

All the best.


Written by DataEase 28/04/17 at 14:47:47 Dataease [{8}]FIVE

Re:Re:Re:Re:Length of text field

I was able to convert 2 text fields (250 each in length) to 1 memo field.  It's great!!!!  However, on another form I have 4 notes fields (all 255 max) that I'd like to put into a memo field.  I've tried everything I can think of to manipulate the data and just can't get it to put the text in the memo field.  It looks like it is truncating 1/2 way into the second text field.  Any thoughts?


Written by Karen Miller 02/05/17 at 18:02:34 Dataease [{8}]FIVE

Re:Re:Re:Re:Re:Length of text field

Download Sample

Hi again Karen.


At the moment no function in DataEase can return more than 255 characters. So if you combine 2 fields that contain more than 255 characters, then it will "clip" at 255.

This is an obvious limitation working with Memos that can contain up to 4MB of data.

This is why we have a separate set of functions for Memos.

MemoChunk

MemoCopy

MemoDecodePair

MemoExecDQL

MemoFind

MemoGetGlobal()

MemoLength

MemoMemoCopy

MemoMemoReplace

MemoReplace

MemoSetGlobal()

MemoStringBetween

MemoStringFrom

MemoStringTo

MemoWordCount

MemoWriteToFile

PrintMemo

SetMemoValue

if you want to merge a number of Text fields into a memo you need to use MemoCopy function in a DQL like the sample below

define "retval" text .

for MemoMerge ;

modify Records

Dummy := MemoCopy(MyMemo,concat(TextField," "),1) ;

Dummy := MemoCopy(MyMemo,concat(TextField1," "),data-entry field1) ;

Dummy := MemoCopy(MyMemo,concat(TextField2," "),data-entry field1) ;

Dummy := MemoCopy(MyMemo,concat(TextField3," "),data-entry field1) .

end

retval := refreshscreen() .

You can download the sample and "steal" the code ;-)


Written by DataEase 08/05/17 at 15:53:41 Dataease [{8}]FIVE
DG3_ForumList