MSSQL >8000 characters

When I try to import my solution to a MSSQL database, I got an column size error (in Dutch).

com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: De omvang (8192) die is gegeven aan de kolom registergoed, overschrijdt de maximumomvang voor alle gegevenstypen (8000).

(English) The size (8192) which is given to the column ‘registergoed’, overruns the maximum size for al data types (8000)

Where have you used the solution before (what database)? What field type is that field in the original database?

In sybase 10 the column is varchar size 8192 (I believe made by servoy).

Yes, ok. In MS SQL the maximum varchar length is 8000. If you need larger field content, you need to change that column to TEXT using a SQL tool. But be aware that some things are limited in that field type (ORDER BY, LIKE, …).

The maximum recordsize of a record within MS SQL Server is 8000 characters. SQL Server uses some extra bytes, which makes the pagesize 8192.

In servoy a TEXT field is default created as varchar(50) for SQL-Server.

But the varchar(50) type doesn’t use all the 50 characters. There are 50 characters allocated. That is the reason why it is a warning and not an error.
But in case you fill all your varchar(50) fields completely with random characters and the recordsize will be more than 8000 , then you risk loosing some data.

In case you have Servoy types TEXT with length bigger than 500, consider to use the TEXT type within SQL Server. In that case this length will not be calculated in the maximum recordsize.

Servoy handles this correctly. As you can see on the screenshot it will keep the type TEXT, but with size of a MEDIA type.
Use a TEXT_AREA on your form and all functions well.