Subject | Re: Read-Only Database |
---|---|
Author | aleskahanek |
Post date | 2005-12-12T21:17:10Z |
Hi Jason,
I have the same problem with the read only database. I can reproduce
this also with the call stack (see below). Even whe
1) When the database is marked as read-only in the file-system
(supposed to be read from CD), then the error is the following. When
it is read only in the file system and also marked as read only with
gfix -mode read_only, the error message is still the same (I suppose
that the "file system read only" has bigger priority over the "gfix
read only mode").
ISC ERROR CODE:335544352
ISC ERROR MESSAGE:
no permission for read-write access to database C:\fotky\Foto\foto.fdb
[004D4098] IB_Session.TIB_SessionBase.HandleException (Line 1156,
"IB_Session.pas" + 68)
[004EAD0A] IB_Components.TIB_Connection.API_Connect (Line 1874,
"IBA_Connection.IMP" + 159)
[004E9018] IB_Components.TIB_Connection.SysConnect (Line 1167,
"IBA_Connection.IMP" + 17)
[004EDA20] IB_Components.TIB_Transaction.SysBeforeStart (Line 615,
"IBA_Transaction.IMP" + 9)
[004ED94A] IB_Components.TIB_Transaction.SysStart (Line 591,
"IBA_Transaction.IMP" + 8)
[004F46C0] IB_Components.TIB_Statement.CheckTransaction (Line 1372,
"IBA_Statement.IMP" + 35)
[004F5B1C] IB_Components.TIB_Statement.SysExecute (Line 1890,
"IBA_Statement.IMP" + 1)
[004FF18A] IB_Components.TIB_Dataset.SysExecute (Line 2033,
"IBA_Dataset.IMP" + 7)
[004FE941] IB_Components.TIB_Dataset.SysOpen (Line 1833,
"IBA_Dataset.IMP" + 22)
[004FE45B] IB_Components.TIB_Dataset.Open (Line 1647,
"IBA_Dataset.IMP" + 8)
[00693B09] Main.TfmMain.LoadEditors (Line 2456, "Main.pas" + 7)
[0068DAC9] Main.TfmMain.Create (Line 640, "Main.pas" + 52)
[004A5A68] Forms.TApplication.CreateForm (Line 6946, "Forms.pas" + 4)
[00696E17] Foto.Foto (Line 123, "C:\fotky\Foto\Foto.dpr" + 68)
2) When the DB file is NOT marked as read only in the file system and
IS marked as read only with gfix -mode read_only, then the error
message is the following.
ISC ERROR CODE:335544765
ISC ERROR MESSAGE:
attempted update on read-only database
[004D4098] IB_Session.TIB_SessionBase.HandleException (Line 1156,
"IB_Session.pas" + 68)
[004EAD0A] IB_Components.TIB_Connection.API_Connect (Line 1874,
"IBA_Connection.IMP" + 159)
[004E9018] IB_Components.TIB_Connection.SysConnect (Line 1167,
"IBA_Connection.IMP" + 17)
[004EDA20] IB_Components.TIB_Transaction.SysBeforeStart (Line 615,
"IBA_Transaction.IMP" + 9)
[004ED94A] IB_Components.TIB_Transaction.SysStart (Line 591,
"IBA_Transaction.IMP" + 8)
[004F46C0] IB_Components.TIB_Statement.CheckTransaction (Line 1372,
"IBA_Statement.IMP" + 35)
[004F5B1C] IB_Components.TIB_Statement.SysExecute (Line 1890,
"IBA_Statement.IMP" + 1)
[004FF18A] IB_Components.TIB_Dataset.SysExecute (Line 2033,
"IBA_Dataset.IMP" + 7)
[004FE941] IB_Components.TIB_Dataset.SysOpen (Line 1833,
"IBA_Dataset.IMP" + 22)
[004FE45B] IB_Components.TIB_Dataset.Open (Line 1647,
"IBA_Dataset.IMP" + 8)
[00693B09] Main.TfmMain.LoadEditors (Line 2456, "Main.pas" + 7)
[0068DAC9] Main.TfmMain.Create (Line 640, "Main.pas" + 52)
[004A5A68] Forms.TApplication.CreateForm (Line 6946, "Forms.pas" + 4)
[00696E17] Foto.Foto (Line 123, "C:\fotky\Foto\Foto.dpr" + 68)
The error is raised after TIB_Query.Open statement. The query and the
attached transaction is marked as read only. The SQL property of this
query is very simple 'SELECT ID, NAME FROM EDITORS', nothing to write
to database. I have found a document at IBPhoenix
http://ibphoenix.com/main.nfs?a=ibphoenix&s=1120089951:362508&page=ibp_60_ro_db_ds
with this text "This is because, InterBase updates the transaction ID
in the database header page for all current types of transactions",
could this be this case?
PS: I still use the IBO 4.2.Ie version so the line numbers are
different from the current version but the procedure names could help
you, I think.
Is this an IBO bug or I have to adjust something else to make it working?
Thank you for any hints.
Ales Kahanek
I have the same problem with the read only database. I can reproduce
this also with the call stack (see below). Even whe
1) When the database is marked as read-only in the file-system
(supposed to be read from CD), then the error is the following. When
it is read only in the file system and also marked as read only with
gfix -mode read_only, the error message is still the same (I suppose
that the "file system read only" has bigger priority over the "gfix
read only mode").
ISC ERROR CODE:335544352
ISC ERROR MESSAGE:
no permission for read-write access to database C:\fotky\Foto\foto.fdb
[004D4098] IB_Session.TIB_SessionBase.HandleException (Line 1156,
"IB_Session.pas" + 68)
[004EAD0A] IB_Components.TIB_Connection.API_Connect (Line 1874,
"IBA_Connection.IMP" + 159)
[004E9018] IB_Components.TIB_Connection.SysConnect (Line 1167,
"IBA_Connection.IMP" + 17)
[004EDA20] IB_Components.TIB_Transaction.SysBeforeStart (Line 615,
"IBA_Transaction.IMP" + 9)
[004ED94A] IB_Components.TIB_Transaction.SysStart (Line 591,
"IBA_Transaction.IMP" + 8)
[004F46C0] IB_Components.TIB_Statement.CheckTransaction (Line 1372,
"IBA_Statement.IMP" + 35)
[004F5B1C] IB_Components.TIB_Statement.SysExecute (Line 1890,
"IBA_Statement.IMP" + 1)
[004FF18A] IB_Components.TIB_Dataset.SysExecute (Line 2033,
"IBA_Dataset.IMP" + 7)
[004FE941] IB_Components.TIB_Dataset.SysOpen (Line 1833,
"IBA_Dataset.IMP" + 22)
[004FE45B] IB_Components.TIB_Dataset.Open (Line 1647,
"IBA_Dataset.IMP" + 8)
[00693B09] Main.TfmMain.LoadEditors (Line 2456, "Main.pas" + 7)
[0068DAC9] Main.TfmMain.Create (Line 640, "Main.pas" + 52)
[004A5A68] Forms.TApplication.CreateForm (Line 6946, "Forms.pas" + 4)
[00696E17] Foto.Foto (Line 123, "C:\fotky\Foto\Foto.dpr" + 68)
2) When the DB file is NOT marked as read only in the file system and
IS marked as read only with gfix -mode read_only, then the error
message is the following.
ISC ERROR CODE:335544765
ISC ERROR MESSAGE:
attempted update on read-only database
[004D4098] IB_Session.TIB_SessionBase.HandleException (Line 1156,
"IB_Session.pas" + 68)
[004EAD0A] IB_Components.TIB_Connection.API_Connect (Line 1874,
"IBA_Connection.IMP" + 159)
[004E9018] IB_Components.TIB_Connection.SysConnect (Line 1167,
"IBA_Connection.IMP" + 17)
[004EDA20] IB_Components.TIB_Transaction.SysBeforeStart (Line 615,
"IBA_Transaction.IMP" + 9)
[004ED94A] IB_Components.TIB_Transaction.SysStart (Line 591,
"IBA_Transaction.IMP" + 8)
[004F46C0] IB_Components.TIB_Statement.CheckTransaction (Line 1372,
"IBA_Statement.IMP" + 35)
[004F5B1C] IB_Components.TIB_Statement.SysExecute (Line 1890,
"IBA_Statement.IMP" + 1)
[004FF18A] IB_Components.TIB_Dataset.SysExecute (Line 2033,
"IBA_Dataset.IMP" + 7)
[004FE941] IB_Components.TIB_Dataset.SysOpen (Line 1833,
"IBA_Dataset.IMP" + 22)
[004FE45B] IB_Components.TIB_Dataset.Open (Line 1647,
"IBA_Dataset.IMP" + 8)
[00693B09] Main.TfmMain.LoadEditors (Line 2456, "Main.pas" + 7)
[0068DAC9] Main.TfmMain.Create (Line 640, "Main.pas" + 52)
[004A5A68] Forms.TApplication.CreateForm (Line 6946, "Forms.pas" + 4)
[00696E17] Foto.Foto (Line 123, "C:\fotky\Foto\Foto.dpr" + 68)
The error is raised after TIB_Query.Open statement. The query and the
attached transaction is marked as read only. The SQL property of this
query is very simple 'SELECT ID, NAME FROM EDITORS', nothing to write
to database. I have found a document at IBPhoenix
http://ibphoenix.com/main.nfs?a=ibphoenix&s=1120089951:362508&page=ibp_60_ro_db_ds
with this text "This is because, InterBase updates the transaction ID
in the database header page for all current types of transactions",
could this be this case?
PS: I still use the IBO 4.2.Ie version so the line numbers are
different from the current version but the procedure names could help
you, I think.
Is this an IBO bug or I have to adjust something else to make it working?
Thank you for any hints.
Ales Kahanek
--- In IBObjects@yahoogroups.com, "Jason Wharton" <jwharton@i...> wrote:
>
> This looks like something in your code rather than something in my code.
> I'm still puzzled over this.
>
> Jason
>
>
> > -----Original Message-----
> > From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> > Behalf Of Daniel Pohren
> > Sent: Tuesday, November 08, 2005 3:18 AM
> > To: IBObjects@yahoogroups.com
> > Subject: Re: [IBO] Read-Only Database
> >
> >
> > Good morning. You mean the Delphi CallStack? When I run the software
> > (debugging it in Delphi) it returns me almost nothing, because the
> > connection routine is in the FormCreate Event, being the
> > first thing to be
> > done by the application... Here is how I connect to the tIBODatabase.
> > Components -
> > BancoDados: tIBODatabase
> > Transacao - tIBOTransaction
> > Result of the function GetCaminhoDoPath -
> > 192.168.7.100:c:\dados\MICROFISCHER\SISTEMA\bin\DADOS_READONLY.DFDB
> > BancoDados.Close;
> > BancoDados.DatabaseName := GetCaminhoDoIni(ExtractFilePath(
> > Application.ExeName) + 'DADOS.DFDB');
> > BancoDados.SysDBA := 'SYSDBA';
> > BancoDados.Password := 'masterkey';
> > try
> > BancoDados.Open;
> > except
> > BancoDados.ReadOnly := true;
> > Transacao.ReadOnly := true;
> > BancoDados.Open;
> > end;
> > The reason why I think I'm forgetting to set some property of the
> > tIBODatabase is that even when I'm not running the software,
> > when I'm in
> > design time, and try to chancge the connected property I
> > recieve the same
> > error...
> > Thanks in advance
> > On 11/7/05, Jason Wharton <jwharton@i...> wrote:
> > >
> > > I'm convinced there is something that needs to be resolved.
> > The callstack
> > > on this would still be very helpful.
> > >
> > > Jason Wharton
> > >
> > >
> > > > -----Original Message-----
> > > > From: IBObjects@yahoogroups.com
> > [mailto:IBObjects@yahoogroups.com]On
> > > > Behalf Of Daniel Pohren
> > > > Sent: Monday, November 07, 2005 9:16 AM
> > > > To: IBObjects@yahoogroups.com
> > > > Subject: Re: [IBO] Read-Only Database
> > > >
> > > >
> > > > This error ocurs even INSIDE delphi...
> > > > If I select the tIBOConnection component, clic in the
> > > > "connected" property
> > > > and change it to True ig gives me this exception...
> > > >
> > > > On 11/7/05, Jason Wharton <jwharton@i...> wrote:
> > > > >
> > > > > > How can I connet in a read-only database (FB 1.5) using IBO?
> > > > > > It returns me an "attempting to update a read_only database"
> > > > > > error when I try to connect using the IBODatabase
> > > > >
> > > > > What is the callstack on that exception?
> > > > >
> > > > > This will tell us what is actually attempting an update.
> > > > >
> > > > > Jason Wharton
> > >
> > >
> > >
> > >
> > >
> > ______________________________________________________________
> > _____________
> > > IB Objects - direct, complete, custom connectivity to Firebird or
> > > InterBase
> > > without the need for BDE, ODBC or any other layer.
> > >
> > >
> > ______________________________________________________________
> > _____________
> > > http://www.ibobjects.com - your IBO community resource for Tech Info
> > > papers,
> > > keyword-searchable FAQ, community code contributions and more !
> > >
> > >
> > > ------------------------------
> > > YAHOO! GROUPS LINKS
> > >
> > >
> > > - Visit your group
> > "IBObjects<http://groups.yahoo.com/group/IBObjects>"
> > > on the web.
> > > - To unsubscribe from this group, send an email to:
> > >
> > IBObjects-unsubscribe@yahoogroups.com<IBObjects-unsubscribe@ya
> > hoogroups.com?subject=Unsubscribe>
> > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > > Service <http://docs.yahoo.com/info/terms/>.
> > >
> > >
> > > ------------------------------
> > >
> >
> >
> >
> > --
> > Daniel Pohren
> > Naphta Informática
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> > --------------------~-->
> > Most low income households are not online. Help bridge the
> > digital divide today!
> > http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/PhFolB/TM
> > --------------------------------------------------------------
> > ------~->
> >
> > ______________________________________________________________
> > _____________
> > IB Objects - direct, complete, custom connectivity to
> > Firebird or InterBase
> > without the need for BDE, ODBC or any other layer.
> > ______________________________________________________________
> > _____________
> > http://www.ibobjects.com - your IBO community resource for
> > Tech Info papers,
> > keyword-searchable FAQ, community code contributions and more
> > !
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>