Can't open old database with Firebird 1.5-2.1
Posted: 09.09.2019, 11:42
Zeos can't open old database with old Firebird (2.0 for example).
Tables can be acquired with ZConnection.GetTableNames. But next Zeos can't get data with ZQuery or ZTable: raise EZSQLException:
SQL Error: Dynamic SQL ErrorSQL error code = -206Column unknownB.RDB$FIELD_PRECISIONAt line 1, column 249. Error Code: -206. Column does not belong to referenced table The SQL: SELECT a.RDB$RELATION_NAME, a.RDB$FIELD_NAME, a.RDB$FIELD_POSITION, a.RDB$NULL_FLAG, a.RDB$DEFAULT_VALUE, b.RDB$FIELD_LENGTH, b.RDB$FIELD_SCALE, c.RDB$TYPE_NAME, b.RDB$FIELD_TYPE, b.RDB$FIELD_SUB_TYPE, b.RDB$DESCRIPTION, b.RDB$CHARACTER_LENGTH, b.RDB$FIELD_PRECISION, a.RDB$DEFAULT_SOURCE, b.RDB$DEFAULT_SOURCE as RDB$DEFAULT_SOURCE_DOMAIN,b.RDB$COMPUTED_SOURCE , b.RDB$CHARACTER_SET_ID FROM RDB$RELATION_FIELDS a JOIN RDB$FIELDS b ON (b.RDB$FIELD_NAME = a.RDB$FIELD_SOURCE) LEFT JOIN RDB$TYPES c ON (b.RDB$FIELD_TYPE = c.RDB$TYPE and c.RDB$FIELD_NAME = 'RDB$FIELD_TYPE') WHERE 1=1 AND a.RDB$RELATION_NAME = 'CUSTOMER' ORDER BY a.RDB$RELATION_NAME, a.RDB$FIELD_POSITION;
Tables can be acquired with ZConnection.GetTableNames. But next Zeos can't get data with ZQuery or ZTable: raise EZSQLException:
SQL Error: Dynamic SQL ErrorSQL error code = -206Column unknownB.RDB$FIELD_PRECISIONAt line 1, column 249. Error Code: -206. Column does not belong to referenced table The SQL: SELECT a.RDB$RELATION_NAME, a.RDB$FIELD_NAME, a.RDB$FIELD_POSITION, a.RDB$NULL_FLAG, a.RDB$DEFAULT_VALUE, b.RDB$FIELD_LENGTH, b.RDB$FIELD_SCALE, c.RDB$TYPE_NAME, b.RDB$FIELD_TYPE, b.RDB$FIELD_SUB_TYPE, b.RDB$DESCRIPTION, b.RDB$CHARACTER_LENGTH, b.RDB$FIELD_PRECISION, a.RDB$DEFAULT_SOURCE, b.RDB$DEFAULT_SOURCE as RDB$DEFAULT_SOURCE_DOMAIN,b.RDB$COMPUTED_SOURCE , b.RDB$CHARACTER_SET_ID FROM RDB$RELATION_FIELDS a JOIN RDB$FIELDS b ON (b.RDB$FIELD_NAME = a.RDB$FIELD_SOURCE) LEFT JOIN RDB$TYPES c ON (b.RDB$FIELD_TYPE = c.RDB$TYPE and c.RDB$FIELD_NAME = 'RDB$FIELD_TYPE') WHERE 1=1 AND a.RDB$RELATION_NAME = 'CUSTOMER' ORDER BY a.RDB$RELATION_NAME, a.RDB$FIELD_POSITION;