Maximum size for text data type

Maximum size for text data type

  

Hey!

I was trying to store JSON strings using text data type. It will be helpful if I could know what is the maximum size of text data type in outsystems?

Hi Shashankit Thakur,


After doing some search for this topic I found this community discussion and also please read out the João Batista reply. Hope this discussion will be a help for your query. 


Kind Regards,

Benjith Sam


Shashankit Thakur wrote:

Hey!

I was trying to store JSON strings using text data type. It will be helpful if I could know what is the maximum size of text data type in outsystems?

Hi Shashankit Thakur,

It depends on the database which you are using. for example if you are using SQL server 12 the max length is 4000 Character.


Raj wrote:

Shashankit Thakur wrote:

Hey!

I was trying to store JSON strings using text data type. It will be helpful if I could know what is the maximum size of text data type in outsystems?

Hi Shashankit Thakur,

It depends on the database which you are using. for example if you are using SQL server 12 the max length is 4000 Character.


Thanks!


Hi,

For strings bigger than 2000 outsystems uses nvarchar(max). 

The max size for a column of type NVARCHAR(MAX) is 2 GByte of storage.

Since NVARCHAR uses 2 bytes per character, that's approx. 1 billion characters

Regards,

Marcelo

Neither this thread, nor the one linked above, answers the question!


Outsystems may USE varchar(max), but if you set it to 4000, would that still limit it to 4000 characters?

Hi Nathan,

Yes Outsystems will limit it.

Regards,

Marcelo

So if you want the maximum space, what length value do you use... the max value for an int is 2,147,483,647, so can we just whack in 999999999 (999 million etc)

Hi Nathan,

Never tried it before but in theory it should work. If you end up doing the experiment share with us the result.

Regards,

Marcelo