|Derby territory based databases [message #591422]
||Sat, 14 June 2008 15:30
| Stephan van Loendersloot
Registered: July 2009
I'm trying to use the latest RC3 packages with Derby databases that use
territory-based collation, but no database properties in any schema
(tables, stored procedures etc.) are viewable.
This used to be a known problem with the Derby-tools itself. The error
message that Derby returns is the following:
Failed Statement is: SELECT TABLENAME AS TABLE_NAME, TABLETYPE AS
TABLE_TYPE FROM SYS.SYSTABLES A,SYS.SYSSCHEMAS B WHERE
A.SCHEMAID=B.SCHEMAID AND B.SCHEMANAME='AZLOGISTICS' AND ( TABLETYPE='A'
OR TABLETYPE='T' OR TABLETYPE='S' OR TABLETYPE='V' )
ERROR 42818: Comparisons between 'VARCHAR (UCS_BASIC)' and 'CHAR
(TERRITORY_BASED)' are not supported. Types must be comparable. String
types must also have matching collation. If collation does not match, a
possible solution is to cast operands to force them to the default
collation (e.g. SELECT tablename FROM sys.systables WHERE CAST(tablename
AS VARCHAR(128)) = 'T1')
This information is somewhat misleading. For regular comparisons, the
workaround suggested in the error message does apply, but for retrieving
database schema information, the workaround is as simple as executing a
'SET SCHEMA SYS;' statement on the connection before the 'SELECT
This generally accounts for retrieving any database schema information.
For related information, please see the following URL:
I made a custom fix for this when using previous versions of DTP, but
that build process is so cumbersome, that I would be very pleased to see
this getting fixed before Ganymede gets released.
Stephan van Loendersloot.
Powered by FUDForum
. Page generated in 0.02172 seconds