Board index » delphi » Delphi still dosn't write to disk !

Delphi still dosn't write to disk !

Hi Folks
    I (and lots of other people) have mentioned this problem
before. I was lead to believe it had been fixed in the 1.02
update to delphi. NOT SO !

    There is situations where Delphi caches data that should be
written to disk. The caching takes place in the BDE. If the
application does not get a chance to close the file, then that
data is lost. This happens, for example, if the computer is
turned of without closing the application and/or windows.
The database must be stored on a local disk, not network.

    I will quote specific circumstances so any one can duplicate
the problem :
        1. Use the DBD to make a dbase4 file with two fields, say
           FName, GName on a local drive.
        2. Use Delphi database form expert to make a form to access
           that database.
        3. Run the application, run file manager to look at the size
           of the database file. (remember to click on the disk icon
           to relog the drive each time).
        4  Add some data to dbase, commit it and note that file size
           has not changed. Keep adding data, keep looking at file
size.
           In my case, it is not getting any bigger !

I have tried :
        A. DBIUseIdleTime()
        B. Setting BDE local share to true.
        C. Several other calls to BDE that are reported to cause a
real write.
        D. The Delphi upgrade (ver 1.02 ??)
        X. Most combinations of the above.

I am not sure if the problem is unique to dbase4 files, I am too sick
of the subject to try it. Just be warned that when you send a Delphi
application out you may be risking your customer's data.

Most of my IDAPI files are dated 22 June, 1995. If some one cannot
duplicate my problem please let me know the date of your IDAPI stuff.
With Borland's secrets policy, maybe there are different versions of
ver 1.02 (if that is what it really is). My new CDROM is visually
identical to the origional.

Borland would do so much better if it took the attitude that bugs
should be admitted to and listed. When an update is released, list
the problems fixed. For God's sake, programmers know that software
has bugs in it ! Why make us find out the hard way ???

Oh well, Delphi's a great product, but is it great enough ??

------------------------------------------------------------
David Bannon                      D.Ban...@latrobe.edu.au
School of Biochemistry            Phone 61 03 479 2197
La Trobe University, Plenty Rd,   Fax   61 03 479 2467
Bundoora, Vic, Australia, 3083
------------------------------------------------------------
..... Humpty Dumpty was pushed !

 

Re:Delphi still dosn't write to disk !


PErhaps its the CACHE in the file manager that does not load
the file! If not then I be XXXX, what the hell are those data
{*word*154} out there? Surely Delphi must not be that weak!

Re:Delphi still dosn't write to disk !


In article <489342$...@lugb.latrobe.edu.au>, D.Ban...@latrobe.edu.au says...

Further information on this matter. Details of the problem
appears below this section.

My advice from Borland (yes after 3 months of complaining,
I have finally heard from Borland) is that you should call
DBISaveChanges(Handle) which will write to disk but not
update the FAT ! They suggest that you run scandisk after
such an event which may recover your data. Closing
the file will, of course, flush the data.

It seems to me that the only solution is to close the file
after every write and then reopen it. Of course this means that
you will loose track of the current record (bookmarks are not
valid over files closures). The answer might be to get the record
number before closing and then returning to that record number.
I know the idea of record numbers is frowned upon in a shared
system, but this problem only exists if the database is not on
a network drive.

I supose that the problem has a fairly limited range. It will only
really be necessary to to the above when :

    Application is running at all time, such as the situation I have
    where app starts as windows starts, gathers data all day and is
    killed when computer is shut down. If user closes windows then
    it is OK, if they power down with windows running, very sad.

    Database is not on a network drive. (why can't I make it think
    it is on a network drive ??)

    Data is saved through the BDE, not to a custom data file.

// ----------------------------------------------------------------

P.S. I had an email reply from someone I could not reply to, suggest
he/she look at return address :
550 <ad...@pc.jaring>... Host unknown (Name server: pc.jaring: host not found)

// ----------------------------------------------------------------
// Summary of effects of problem.
// ----------------------------------------------------------------

Hi Folks
    I (and lots of other people) have mentioned this problem
before. I was lead to believe it had been fixed in the 1.02
update to delphi. NOT SO !

    There is situations where Delphi caches data that should be
written to disk. The caching takes place in the BDE. If the
application does not get a chance to close the file, then that
data is lost. This happens, for example, if the computer is
turned of without closing the application and/or windows.
The database must be stored on a local disk, not network.

    I will quote specific circumstances so any one can duplicate
the problem :
        1. Use the DBD to make a dbase4 file with two fields, say
           FName, GName on a local drive.
        2. Use Delphi database form expert to make a form to access
           that database.
        3. Run the application, run file manager to look at the size
           of the database file. (remember to click on the disk icon
           to relog the drive each time).
        4  Add some data to dbase, commit it and note that file size
           has not changed. Keep adding data, keep looking at file
           size.
           In my case, it is not getting any bigger !

I have tried :
        A. DBIUseIdleTime()
        B. Setting BDE local share to true.
        C. Several other calls to BDE that are reported to cause a
           real write.
        D. The Delphi upgrade (ver 1.02 ??)
        X. Most combinations of the above.

I am not sure if the problem is unique to dbase4 files, I am too sick
of the subject to try it. Just be warned that when you send a Delphi
application out you may be risking your customer's data.

Most of my IDAPI files are dated 22 June, 1995. If some one cannot
duplicate my problem please let me know the date of your IDAPI stuff.
With Borland's secrets policy, maybe there are different versions of
ver 1.02 (if that is what it really is). My new CDROM is visually
identical to the origional.

Borland would do so much better if it took the attitude that bugs
should be admitted to and listed. When an update is released, list
the problems fixed. For God's sake, programmers know that software
has bugs in it ! Why make us find out the hard way ???

Oh well, Delphi's a great product, but is it great enough ??

------------------------------------------------------------
David Bannon                      D.Ban...@latrobe.edu.au
School of Biochemistry            Phone 61 03 479 2197
La Trobe University, Plenty Rd,   Fax   61 03 479 2467
Bundoora, Vic, Australia, 3083
------------------------------------------------------------
..... Humpty Dumpty was pushed !

Other Threads