Board index » delphi » How to commit changes to pdox table files???

How to commit changes to pdox table files???

Hi!

Program made with Delphi 3, uses local Paradox files. Seems to behave like
this:

All changes that program makes to database are written to INMEMnnn.REM
-files in temp-directory. *.DB files remain unchanged until program is run
down. I am not using cached updates.

Problem: If / when computer halts, all database updates are lost. If only
the program halts, changes seem to usually be recovered from REM-files on
next startup.

How can I force the program to write pending changes to DB-files run-time?
Do BeginTransaction and Commit mean anything without a "real" db-engine?
And ApplyUpdates is said not to work without CachedUpdates...?

Even closing the Session run-time did not remove REM-file, only closing the
program.

I have a real problem here, please help if you know what is going on ...

 

Re:How to commit changes to pdox table files???


Set Local Share to True in the BDE Administrator.

Bill

(Sorry but TeamB cannot answer support questions received via email.)
(To send me email for any other reason remove .nospam from my address.)

Re:How to commit changes to pdox table files???


Set Local Share to true in the BDE configuration.
 ---- x
==============================
Xavier Pacheco (TeamB)
xav...@xapware.com

Sorry but TeamB cannot answer support
questions received via email.

Re:How to commit changes to pdox table files???


I was told to set LOCAL SHARE to TRUE to fix the following problem. This
setting only fixes the problem when the program is halted unintentionally.
But if the the computer halts (e.g. power failure), all changes made to
database during the session are lost. There may go a work of several weeks
just like that...

Please, do you have any more solutions? Or should I just get rid of Paradox
with "serious" applications?

Mika Etelapaa <mika.etela...@sunit.fi> wrote in article
<01bd24c3$ad7572a0$228b89c2@savcornt2>...

Quote
> All changes that program makes to database are written to INMEMnnn.REM
> -files in temp-directory. *.DB files remain unchanged until program is
run
> down. I am not using cached updates.

> Problem: If / when computer halts, all database updates are lost. If only
> the program halts, changes seem to usually be recovered from REM-files on
> next startup.

> How can I force the program to write pending changes to DB-files
run-time?
> Do BeginTransaction and Commit mean anything without a "real" db-engine?
> And ApplyUpdates is said not to work without CachedUpdates...?

Re:How to commit changes to pdox table files???


Quote
>I was told to set LOCAL SHARE to TRUE to fix the following problem. This
>setting only fixes the problem when the program is halted unintentionally.
>But if the the computer halts (e.g. power failure), all changes made to
>database during the session are lost.

if you are loosing records after a power outage then you have some
kind of write caching in effect that BDE has no control over.

Brian
--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:How to commit changes to pdox table files???


Quote
> if you are loosing records after a power outage then you have some
> kind of write caching in effect that BDE has no control over.

I don't think so, my Win-95 environment has default settings what comes to
file handling. But there may be something with Paradox that I don't
understand correctly. For example:

What purpose does INMEM0.REM file have? Is it some kind of transaction log
or what?

And once again the problem as it occurs:
1. I start Windows Explorer and view Paradox table files (sizes and
timestamps)
2. I start the program and start making changes to tables.
3. In Explorer I see that table files remain unchanged.
4. I stop the program.
5. I look the files once more and see that NOW they have been updated.

So, changes are _really_ committed only after stopping the program. No
matter if I put StartTransaction - Commit -commands in the program. With
LOCAL SHARE set to True BDE seems to be able to commit changes even if the
program halts unintentionally. But if the whole computer halts, even BDE
can't do anything. So it would be vital to write the changes all the way to
the disk, and to the right files.

If anyone still has new ideas. please let me know.

Re:How to commit changes to pdox table files???


If you are running Win95 with the default settings then you have write
caching enabled.  In control panel double click on System then choose
Performance | File System and check the bottom checkbox.

If Local Share is set to True the BDE does not cache writes.

Bill

(Sorry but TeamB cannot answer support questions received via email.)
(To send me email for any other reason remove .nospam from my address.)

Re:How to commit changes to pdox table files???


Quote
>What purpose does INMEM0.REM file have? Is it some kind of transaction log
>or what?

My guess is it is some kind of swap file

Quote

>And once again the problem as it occurs:
>1. I start Windows Explorer and view Paradox table files (sizes and
>timestamps)
>2. I start the program and start making changes to tables.
>3. In Explorer I see that table files remain unchanged.
>4. I stop the program.
>5. I look the files once more and see that NOW they have been updated.

So what?   BDE like most programs is going to keep the file open.
Open and closing it after each write will slow down BDE
And the opperation system isn't going to update file information until
the file is closed.

h a
--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:How to commit changes to pdox table files???


Quote
> So what?   BDE like most programs is going to keep the file open.
> Open and closing it after each write will slow down BDE
> And the opperation system isn't going to update file information until
> the file is closed.

Of course! How silly of me! But, does not this also mean that if the system
crashes, we have no way to be sure of file integrity? And how good is
Paradox in recovering power-failures? And if this is a big risk, as I have
suspected, I am looking for a "workaround" from BDE that could make this
closing and re-opening on the run... Or am I making any sense?

Thank you folks for your precious insights! I think I am slowly beginning
to understand...

Re:How to commit changes to pdox table files???


Quote
>Of course! How silly of me! But, does not this also mean that if the system
>crashes, we have no way to be sure of file integrity?

Yes.

Quote
> And how good is
>Paradox in recovering power-failures?

There is no built in crash recover like there is in client server
databases if that is your question.

Quote
> And if this is a big risk,

I don't have experience with a lot of power failures but my test of
reboooting a machine while tables are open has never given me a
corrupt table.

Quote
>as I have
>suspected, I am looking for a "workaround" from BDE that could make this
>closing and re-opening on the run... Or am I making any sense?

No

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Other Threads