239
Views
9
Comments
Unable to create or update 'LocalStorage.Description' because it exceeds the maximum
Question

Hi,

I got this error in data synchronization:
"Unable to create or update 'LocalStorageTable.Description' because it exceeds the maximum allowed length by 459 characters."

There is a maximum of characters for text fields in local storage?


Thanks,

Pedro

Staff
Rank: #1531

Hi Pedro,

What value have you on the Length property of the Description attribute in the LocalStorageTable entity? You probably need to make it larger (at least 459 chars larger).

Rank: #443

Hi,

I have the same value as in the database: 5000 (https://www.screencast.com/t/2n0ngH0I)

I made a substring in the synchronization query and it does not give error anymore, but that does not solve my problem, that's why I asked if there is a maximum for the localstorage.

Thanks

Staff
Rank: #1531

Hi Pedro,

Probably there is some difference determining the size of the text. Can you send me the text you are trying to insert by private message?

Rank: #951

Hey guys,

i was facing this issue as well and solved it after changing the attribute size and refresh the consumers.

Hope that helps.


Cheers.

mvp_badge
MVP
Rank: #27

Was the size of the attribute changed from 2000 to 5000? If so, there is a bug in the platform on some versions where the dub wasn't updated when changing from 2000 to something bigger. 

Try to make the attribute a bit smaller than 2000, publish, make it 5000 again and publish and let us know if this helps. 

Kind regards,

Remco Dekkinga

I'm having the same problem.

The column of the entity has a length of 500 but the this stranger error happen in a create or update action 

"Unable to create or update 'Question.Comment3' because it exceeds the maximum allowed length by 186 characters."

Do you know what is the JS file name  can I check the metadata of the localstore? Maybe I can see something is not updated as I have in my OS studio project.

In the WebSQL of the Chrome I can see that the size is according the model in my OS Studio.


The most strange is that after I change from 500 to 600 the size, I had another strange error:

Unable to create or update 'Question.Comment3' because it exceeds the maximum allowed length by 86 characters.

In the error before, when the size was 500, the message error was related 186 characters exceeded, and now after I increase the size, the error is about 86 characters exceeded

Rank: #18050

In case anyone else encounters this problem again,

The thing is that the platform inserts NVarchar(max) in the Server Database if the value submitted is >2000 length.

So even if you specify 5000 length in the Server Database property you can have records with more than that.


While in the Local Database (SQLite) this doesn't happen, if you specify 5000 length, you can't have records with more than that. :)

--------------------------------------------------------------//------------------------------------------------------------

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Database_Reference/Database_Data_Types 

SQL Server / SQL Azure 

nvarchar(<length>) if the length is less than or equal to 2000, NVarchar(max) otherwise.

Oracle

VARCHAR2(<length>), if the length is less than or equal to 2000, CLOB otherwise.