Subject Re: [IBO] Read-Only Database with Firebird 2.1.1 and IBObjects 4.8.7
Author drseltsam2008
--- In IBObjects@yahoogroups.com, Thomas Steinmaurer <ts@...> wrote:
>
> > --- In IBObjects@yahoogroups.com, Thomas Steinmaurer <ts@> wrote:
> >>> [snip]
> >>>
> >>>> SELECT RDB$RELATION_FIELDS.*
> >>>> , RDB$RELATION_FIELDS.RDB$DB_KEY
> >>>> from rdb$relation_fields
> >>>> where rdb$default_source is not null
> >>> The statement above fails and leads to the error message.
> >>>
> >>> I have no idea why, possibly it is related to using RDB$DB_KEY
in
> > the
> >>> statement, although the above query works fine on the read-only
> > database
> >>> in isql.
> >> Btw, it's the where clause. For example, changing the where
clause
> > to
> >> WHERE RDB$DEFAULT_SOURCE IS NULL
> >>
> >> allows me to execute the query with IBO and FB 2.1. Both
statements
> > work
> >> fine with Firebird 2.0 and IBO. Weird.
> >>
> >>
> >> --
> >> 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/
> >>
> >
> > Yes I just tried it again: I created a complete new database
file,
> > just with one table
> >
> > create table test ( test integer default 0);
> >
> > after using gfix with parameter -mode read_only I can't execute
the
> > above statement.
> >
> > When I change the table and don't use the "default 0"-part in it,
> > everything works fine.
>
> Btw, do you have an database properties at connection level like
> ForcedWrites, ReservePageSpace, ... set to non default values?
>
> This will reproduce the error message, but already at connect time.
>
>
>
> --
> 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/
>

That's it! I set the CharSet-Property of TIB_Connection-Component to
ISO8859_1 (because I always do this without thinking about it). The
Query produces no error message, when this property is set to an
empty string.

I don't understand the coherence of this property and the problem in
fetching a dataset of this query and why this is a problem in v2.1
and not in v2.0, but this seems to be the solution.

Thank you Thomas