November Happy Hour will be moved to Thursday December 5th.

How many characters can LongString contain?

Vote:
 

I have learned that ShortString (MetaDataType) can hold strings of up to 512 characters.

But what about LongString - how many characters can this data type hold?

(it doesn't seem to be documented anywhere)

#199018
Nov 13, 2018 12:26
Vote:
 

LongString is stored as NVARCHAR(MAX), which is 2GB maximum. Since each character is 2 bytes in length so you get ~ 1 Billion characters maximum.

But I doubt you would want or should have a property that long. But a few KB should be fine. 

#199019
Nov 13, 2018 12:39
Vote:
 

I see :-)

I need to store a meta field of text of up to 5 KB. Is there a better data type than LongString for that purpose?

#199020
Edited, Nov 13, 2018 12:44
Vote:
 

No, LongString is the perfect one (if not the only one) for it 

#199021
Nov 13, 2018 13:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.