If I add a table with a long name in the Database Wizard of the Designer then the name of the table is truncated. What is the reason for this?
The length of the table alias names is limited by the database. So sometimes it will be truncated so that the resulting SQL statement will be executed correctly. For each major database vendor default values have been set for the maximum alias name length. These values could differ for some database versions.
The following list will show you the values for the maximum alias name length for different databases.
- DB2: 128
- Informix: 18
- MS SQL Server: 128
- MySQL: 200
- Oracle: 30
- PostgeSQL: 200
- SAP DB: 32
- Sybase: 200
If you have a database version which supports less than the given alias name length and you have problems that you can not execute reports because of invalid alias names then you should overwrite the particular Database class (e.g. for MS SQL Server com.inet.report.DatabaseSqlServer) and return another value for the method:
int getMaxAliasNameLength()