Board index » delphi » Edit+Post much slower than Insert+Post !

Edit+Post much slower than Insert+Post !

Quote
Per Eivind Jenssen wrote:

> So why does this happen?
> Any ideas?

Yes, now I have!
I tried to reinstall the Database Enginge (BDE35F.ZIP from Borland) on
top of the existing one, but it didn't copy any files (probably because
the installation program saw that the existing files were either the
same or newer). So I deleted the files in the BDE directory and tried
again. Now my application works just fine, there's no difference between
the three code-pieces. I'm happy!

---
Per Eivind Jenssen

 

Re:Edit+Post much slower than Insert+Post !


I have tried this code on several machines (3 desktops and 1 laptop).

Desktop #1: BDE version 3.02 (Delphi 2.0 CD)
Desktop #2: BDE version 3.5f (gotten from Borland site)
Desktop #3: BDE version 3.5f (gotten from Borland site)
Laptop    : BDE version 3.5  (not sure where it comes from, but
IDAPI32.DLL has the same date/time and the same size as in desktop #2
and #3)
The BDE configuration pages are set exactly the same on all PC's.
(I have also tried setting the File system Performance to Desktop
Computer, Network Server and Laptop, but it's always the same result.)

Edit code:
  Table1.Edit;
  * Changing a field in the record *
  Table1.Post;

Append code:
  Table1.Append;
  * Changing a field in the record *
  Table1.Post;

Insert code:
  Table1.Insert;
  * Changing a field in the record *
  Table1.Post;

On the desktops all three codes are quite fast, but on the laptop the
Edit-code is slow because both Edit and Post is writing to my harddisk
immediately when they are executed. That takes time and delays my
system. The strange thing is that it's only the Edit-code that does
this, not the two other code-bits.

So why does this happen?
Any ideas?

----
Per Eivind Jenssen

Other Threads