Subject | Re: [IBO] Read-Only Database with Firebird 2.1.1 and IBObjects 4.8.7 |
---|---|
Author | Thomas Steinmaurer |
Post date | 2008-08-04T15:25:57Z |
> My Software has an option to archive older data to an read-onlyThe above shouldn't be the reason why it is failing on a read-only database.
> marked database which may be stored to a CD or DVD. I created a
> Viewer program using IBObjects that displays the data. That worked
> very well up to Firebird 2.0.3.
>
> Now I moved to Firebird 2.1.1. On opening a query with TIBOQuery
> (IBObjects) I get following error message:
>
> attempted update on read-only database.
>
> I debugged the source code of IBObjects and found out that following
> statement is used before opening the Query:
>
> SELECT F.RDB$FIELD_NAME F_FieldName
> , F.RDB$RELATION_NAME F_RelationName
> , F.RDB$DEFAULT_SOURCE F_DefaultSource
> , D.RDB$DEFAULT_SOURCE D_DefaultSource
> , D.RDB$FIELD_TYPE D_FieldType
> FROM RDB$RELATION_FIELDS F INNER JOIN RDB$FIELDS D
> ON D.RDB$FIELD_NAME = F.RDB$FIELD_SOURCE
> WHERE (( F.RDB$DEFAULT_SOURCE IS NOT NULL ) OR ( D.RDB$DEFAULT_SOURCE
> IS NOT NULL ))
> AND NOT F.RDB$RELATION_NAME STARTING WITH 'RDB$'
> ORDER BY 1
>
> I tried some combinitians and found out that follwing statement fails
> with that error message:
>
> select *
> from rdb$relation_fields
> where rdb$default_source is not null
>
> The problem seems to be, that I created some columns with default
> values. I did a workaround for my archive database an elliminate
> every "default x" from the "create table" statements. Now everything
> works fine again.
>
> Maybe somebody else have the same problem and knows now what to do,
> or Jason reads this (Hi Jason... :-)) and he creates a workaround in
> the next version of IBObjects.
Drop a TIB_MonitorDialog component onto your form, connect it with your
connection component and see what's going on. There must be some kind of
write operation involved.
The above query works fine for me with TIB_Connection, TIB_Transaction,
TIBOQuery. Tried with FB 2.1.0, but not with 2.1.1 though.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/