Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Databases > Weird append pr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 928 of 986
Post > Topic >>

Weird append problem

by "Mark M" <mminnie@[EMAIL PROTECTED] > Aug 14, 2006 at 03:16 PM

I am sup****ting an older Delphi 4 application.  It is a multi user
application that edits and inserts records into a dBase IV DBF residing
on a Netware server.  The problem appears only once in a while, maybe
every few days for a period of a couple of hours.  The applications are
all sharing this DBF, but sometimes adding a new record using the
append method of a TTable object results in an existing DBF record to
be overwritten.  For example, if the DBF contains 100 records, a user
issues an action to add a record to the file, but instead of adding a
record to the end of the file, it overwrites one of the existing 100
records.  The code skeleton is as follows:

ATable.Append;
ATable.FieldByName('REF').AsString:= '1234';
ATable.Post;

I inserted logging into the code to tell me which dBase record was
added, because after the ATable.Post, the record pointer should be on
the newly added record.  So my code changed to:

ATable.Append;
ATable.FieldByName('REF').AsString:= '1234';
ATable.Post;
// Log the adding of the record
Logit("Added record number "+ IntToStr(ATable.Recno));

The log file will show something like:

....
Added record number 100
Added record number 101
Added record number 102
Added record number 103
Added record number 104
Added record number 88
Added record number 89
Added record number 90
.....

I have turned off all file caching in the Netware client.  The Netware
client is up to date except for the W2K machines using a 2 small
revisions old due to conflicts with another legacy application.  I have
tried to FlushBuffers after the post, and tried many many other things.
 It appears the MDX index file is getting corrupt somehow and seeks
using the keys lead to incorrect records.  I have run out of ideas, and
all my ideas are too long to list in one posting.   All workstations
are running BDE 5.1 with all the same settings.

Does anyone have any ideas?
 




 3 Posts in Topic:
Weird append problem
"Mark M" <mm  2006-08-14 15:16:01 
Re: Weird append problem
Jamie <jamie_ka1lpa_no  2006-08-14 20:18:13 
Re: Weird append problem
DB-1 <db1@[EMAIL PROTE  2006-08-15 11:58:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 0:31:32 CDT 2008.