Subject | RE: [IBO] Re: How to set forced writes? |
---|---|
Author | Helen Borrie |
Post date | 2008-07-01T04:24:22Z |
At 12:22 PM 1/07/2008, Calin Pirtea wrote:
From ODS 10 onward, actions that change the header attributes of databases were meant to be accessed only through a SPB (Service Parameter Block), deprecating the old (and dangerous) situation that allows any user to do it through "any old DPB". Some of the old parameters became a bit flaky...but this one is alive and kicking. Oh dear, oh dear!
Worse still, Firebird 2 and higher (ODS 11 and above) were meant to make this possible ONLY through a SPB, i.e. the honeymoon was meant to be over.
But in fact *any user* can still change the write mode through the old API DPB and, hence, can still put the database into a state where FW is switched on or off whilst there are active attachments. Tested with both Fb 1.5.5 and 2.0.4. (Not tested with 2.1.x yet, but I have that sinking feeling that it might still be slipping beneath the QA radar....)
But - PLEASE DON'T WRITE APPS THAT DO IT!
I'll grab Alex Peshkov on ICQ later today and ask him to take a look.
Helen
>Hi Tiago,Oops, Calin, it is true - and it is not meant to be.
>
>You can set forced writes programmatically using IBO if:
>1) Set the TIB_connection.ForcedWrites to True BEFORE you connect to the database.
>2) Connect to the database. Now the property will become read only however the database itself has forced writes turned on.
>
>Same applies if you want to reset the Forced Writes.
From ODS 10 onward, actions that change the header attributes of databases were meant to be accessed only through a SPB (Service Parameter Block), deprecating the old (and dangerous) situation that allows any user to do it through "any old DPB". Some of the old parameters became a bit flaky...but this one is alive and kicking. Oh dear, oh dear!
Worse still, Firebird 2 and higher (ODS 11 and above) were meant to make this possible ONLY through a SPB, i.e. the honeymoon was meant to be over.
But in fact *any user* can still change the write mode through the old API DPB and, hence, can still put the database into a state where FW is switched on or off whilst there are active attachments. Tested with both Fb 1.5.5 and 2.0.4. (Not tested with 2.1.x yet, but I have that sinking feeling that it might still be slipping beneath the QA radar....)
But - PLEASE DON'T WRITE APPS THAT DO IT!
I'll grab Alex Peshkov on ICQ later today and ask him to take a look.
Helen