Help! - How to force Delphi to update Paradox DB files? 
Author Message
 Help! - How to force Delphi to update Paradox DB files?

I attempted to write a program to assess an indexed Paradox 5 database
using delphi 1.0. Everthing seems to be OK until I decide to check how
robust the program is - does it update the database properly just before
a catastrophic shutdown, for example, somebody tripping on the power
cable. Apparently, even though the database appears to be updated with
all the changes made, I found that the copy of the database on the hard
disk is not actually updated until the program is terminated normally. I
also notice that attempts to backup the database (in use) using the
CopyFile command from FMXUTILS.DCU unit (comes with the Delphi sample
files) to a floppy disk invokes an error.

How can I force the database engine to write the changes permanently to
the hard disk without getting out of the program every time? How can I
backup the updated database to a floppy disk without terminating the
program and then use the file manager?

I would appreciate it very much if any kind soul out there can provide
some enlightenment. Thank you in advance.

Yours
Kai-Yee Hoe
Singapore



Sun, 20 Dec 1998 03:00:00 GMT  
 Help! - How to force Delphi to update Paradox DB files?

Quote:

>I attempted to write a program to assess an indexed Paradox 5 database
>using Delphi 1.0. Everthing seems to be OK until I decide to check how
>robust the program is - does it update the database properly just before
>a catastrophic shutdown, for example, somebody tripping on the power
>cable. Apparently, even though the database appears to be updated with
>all the changes made, I found that the copy of the database on the hard
>disk is not actually updated until the program is terminated normally. I
>also notice that attempts to backup the database (in use) using the
>CopyFile command from FMXUTILS.DCU unit (comes with the Delphi sample
>files) to a floppy disk invokes an error.
>How can I force the database engine to write the changes permanently to
>the hard disk without getting out of the program every time? How can I
>backup the updated database to a floppy disk without terminating the
>program and then use the file manager?
>I would appreciate it very much if any kind soul out there can provide
>some enlightenment. Thank you in advance.

(1)  There is a version of BDE in the "BDEDEMO.ZIP" file at ftp.borland.com
that will cause disk updates to occur more timely.

(2)  The general solution is that you need to code your program to call the
routine "DbiUseIdleTime" on-idle and in response to a timer that goes off
every second or so.  You do this whenever any of your databases are connected
or one of your tables are open.

/mr/



Sun, 20 Dec 1998 03:00:00 GMT  
 Help! - How to force Delphi to update Paradox DB files?

Check out dbiSaveChanges and DBIUseIdleTime in the BDE help.

Nick Spurrier (MoDESoft, UK)



Fri, 25 Dec 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to force update of Paradox-files

2. Creating an index file for a Paradox 5.0 db file in Delphi 1.0

3. Read/Update MS Access 7.0 db from Delphi Developer 2.0 (PLEASE HELP)

4. Delphi DB/File Bug -- Help!

5. Need Help- Delphi prog. generates strange db files

6. Updating Access 2.0 DB from Delphi 1.02

7. HELP!! Sybase update Triggers and Delphi Updates

8. Help!! Updating a DB field through FIELDS[x]

9. Help needed with Cached Updates in msAccess97 db

10. Help: Finding Error Field in a DB Insert/Update/Edit Exception

11. How to unload paradox db(to .txt file) ?

12. Accessing Password-protected Paradox .DB file

 

 
Powered by phpBB® Forum Software