Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 18 total
Thread Problem changing DatabaseName property
Thu, Jan 11 2007 11:06 AMPermanent Link

"Bern Rudisill"


--

I think I may have found a bug in DBISAM I started noticing this in
4.25 build 2 and it is still happening in build 3

Basically here is the problem

I have a DBISAMTable component on my form
At first I set the .databasename property to a folder on a CDROM (which
is readonly)
I then set the tablename property
Open the table
Read some data
Close the table


Then later on I set the databasename property to a folder on the HD
(which is not readonly)
set the tablename property
try to empty the table, and I get an 11013 access denied error

Ok this seemed weird to me so I put some debuggin in,
it appears that even after I changed the databasename property to the
HD and set the tablename, the readonly property came back as true, so
it thought it was still reading from the readonly CD

If I do DBISAMTable.readonly:=true and then do the .empty then all
works well.

does not seem like DBISAM is refreshing all its properties after doing
the databasename property change.

Bern

Thu, Jan 11 2007 7:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bern,

<< I have a DBISAMTable component on my form At first I set the
..databasename property to a folder on a CDROM (which
is readonly)
I then set the tablename property
Open the table
Read some data
Close the table

Then later on I set the databasename property to a folder on the HD (which
is not readonly)
set the tablename property
try to empty the table, and I get an 11013 access denied error >>

Did you manually set the ReadOnly property to False before doing this ?
DBISAM only toggles the ReadOnly property to True when it absolutely has to
(CD, etc.).  It does not automatically toggle it back to False if it set to
True, however.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jan 11 2007 7:36 PMPermanent Link

"Bern Rudisill"
Tim Young [Elevate Software] wrote:

> Bern,
>
> << I have a DBISAMTable component on my form At first I set the
> .databasename property to a folder on a CDROM (which is readonly)
> I then set the tablename property
> Open the table
> Read some data
> Close the table
>
> Then later on I set the databasename property to a folder on the HD
> (which is not readonly) set the tablename property
> try to empty the table, and I get an 11013 access denied error >>
>
> Did you manually set the ReadOnly property to False before doing this
> ? DBISAM only toggles the ReadOnly property to True when it
> absolutely has to (CD, etc.).  It does not automatically toggle it
> back to False if it set to True, however.

That would explain it then. I never use to set the readonly property at
all in the 4.25 build 1. May I ask why it does not automatically check
when you set a table active? That would solve this problem. Is there a
reason my it is not automaticaly toggled back to false?

Bern

--
Fri, Jan 12 2007 4:43 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bern


>That would explain it then. I never use to set the readonly property at
>all in the 4.25 build 1. May I ask why it does not automatically check
>when you set a table active? That would solve this problem. Is there a
>reason my it is not automaticaly toggled back to false?

Hows about you (the programmer) may want it set to False and you don't want the engine overriding your wishes?

Roy Lambert
Fri, Jan 12 2007 10:27 AMPermanent Link

"Bern Rudisill"
Roy Lambert wrote:

> Bern
>
>
> > That would explain it then. I never use to set the readonly
> > property at all in the 4.25 build 1. May I ask why it does not
> > automatically check when you set a table active? That would solve
> > this problem. Is there a reason my it is not automaticaly toggled
> > back to false?
>
> Hows about you (the programmer) may want it set to False and you
> don't want the engine overriding your wishes?
>
> Roy Lambert

I (the programmer) would expect the DBISAM engine to set the readonly
state when you open the table, then I would set the readonly state
after I open the table.

Bern

--
Fri, Jan 12 2007 11:04 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bern


And if you close the table and reopen it?

Roy Lambert
Fri, Jan 12 2007 1:31 PMPermanent Link

"Bern Rudisill"
Roy Lambert wrote:

> Bern
>
>
> And if you close the table and reopen it?
>
> Roy Lambert

Then the data engine should reset readonly, then I as the programmer
should set the readonly properity after reopening the table. Otherwise
it there should be a default readonly settings.

Right now if I set the database to a folder that has read/write access
it sets readonly to false, if I then change the database to a folder
that is readonly it changes readonly to true, then if I change back to
a folder with read/write access it DOES NOT change readonly. This seems
weird to me that DBISAM decides when to change the readonly status.

Case in point, A user has 2 folders one is marked as read only in
windows because this is there master tables that they do not want to
make any changes to, the other is are test tables with read/write
allowed. Now I have an application that imports data into their tables,
it ask them for the folder where the tables are, if they choose the
read/write folder all works well. Now lets say that they pick the read
only folder, so when the application tries to write to the tables it
gets an access error, so the user changes the folder to the read/write
folder and tries the import again, since DBISAM does not change the
readonly status back the program will still error out with access
denied, eventhough the folder is clearly marked read/write.

I consider this to be inconsistant behavior in DBISAM

Bern

--
Fri, Jan 12 2007 6:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bern,

<< May I ask why it does not automatically check when you set a table
active? That would solve this problem. Is there a reason my it is not
automaticaly toggled back to false? >>

Sure.  The developer may want to open a read-only cursor on the table
independent of the read-only status of the physical table files.  If we
toggled the ReadOnly property to False in such a case, then this would be
impossible.  It only gets toggled to True in the case of read-only table
files because DBISAM doesn't have any choice - the table cursor must be
read-only in such a case.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jan 12 2007 9:55 PMPermanent Link

"Bern Rudisill"
Tim Young [Elevate Software] wrote:

> Bern,
>
> << May I ask why it does not automatically check when you set a table
> active? That would solve this problem. Is there a reason my it is not
> automaticaly toggled back to false? >>
>
> Sure.  The developer may want to open a read-only cursor on the table
> independent of the read-only status of the physical table files.  If
> we toggled the ReadOnly property to False in such a case, then this
> would be impossible.  It only gets toggled to True in the case of
> read-only table files because DBISAM doesn't have any choice - the
> table cursor must be read-only in such a case.

Right now if I set the database to a folder that has read/write access
it sets readonly to false, if I then change the database to a folder
that is readonly it changes readonly to true, then if I change back to
a folder with read/write access it DOES NOT change readonly. This seems
weird to me that DBISAM decides when to change the readonly status.

Case in point, A user has 2 folders one is marked as read only in
windows because this is there master tables that they do not want to
make any changes to, the other is are test tables with read/write
allowed. Now I have an application that imports data into their tables,
it ask them for the folder where the tables are, if they choose the
read/write folder all works well. Now lets say that they pick the read
only folder, so when the application tries to write to the tables it
gets an access error, so the user changes the folder to the read/write
folder and tries the import again, since DBISAM does not change the
readonly status back the program will still error out with access
denied, eventhough the folder is clearly marked read/write.

I consider this to be inconsistant behavior in DBISAM

bern

--
Sat, Jan 13 2007 9:53 AMPermanent Link

"Robert"

"Bern Rudisill" <bernr@no-sp.am.exitcare dot com> wrote in message
news:F2BBA35D-2031-45AD-AF63-4B2DC73EA2CF@news.elevatesoft.com...
>
>
> I consider this to be inconsistant behavior in DBISAM
>

Is your position that DBISAM should NEVER change the readonly property?

Robert

Page 1 of 2Next Page
Jump to Page:  1 2
Image