Solved

Index corruption with Paradox ???

Posted on 2002-05-03
6
315 Views
Last Modified: 2010-04-04
I got this enviroment.

I am working with Delphi 6 enterprise, BDE, Paradox tables. There is not NET and BDE-LOCALSHARE = FALSE.

I have a paradox table (PEOPLE) with this fields:
  Lastname CHAR(40)
  FirstName CHAR(40)
  Code AUTONUMERIC
  Telephone CHAR(20)
  ...
  ExtraData MEMO(240)
Which primary index is: Lastname, FirstName and Code.
It has no secondary index or referential integrity definitions or anything defined...

Another table was (ACCOUNTS):
  Type SMALLINT
  Name CHAR(80)
  Code AUTONUMERIC
  Extradata INTEGER
Which primary index is: Type, Name and Code.
It has no secondary index or referential integrity definitions or anything defined...


I use the data in this way:
* a main form shows the data in a dbgrid (connected to a TTable component)
* you select a record and edit it in another form, which is open and the data is load in not db-aware components
* you change the data and then, if you accept the changes, the current record is changed and if you it change ACCOUNTS.Name taking the values of PEOPLE.Lastname + ', ' + PEOPLE.FirstName

====================
The problem is this:
====================
When i edit a lot of record (say from 10 to 50) of table PEOPLE changing the Memo field, the data of one record overload into another... Ej:
Rec LastN FirstN    Code Telephone ...  ExtraData
---------------------------------------------------
23  SMITH JOHN      104  555-4876  ...  (MEMO DATA)
24  SMITH STUART    255  555-3242  ...  (MEMO DATA)

The result is:
Rec LastN FirstN    Code Telephone ...  ExtraData
---------------------------------------------------
23  SMITH JOHN      104  555-4876  ...  (MEMO DATA)
24  SMITH JOHN      104  555-4876  ...  (MEMO DATA)

I can detect what i did to make the error happened, but it happened.
I believe it was a paradox index error.

Could this have a solution???

Thanks you all!!!
0
Comment
Question by:spk2000ar
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6988820
?
>I believe it was a paradox index error.

by an index error, you may get an error message, and you can't work further, seems to be more a caching problem

as it is a single user local app, then there could it not be a misconfigoration from different clients, right?

try to adjust buffers, memsizes and caches in the bde-admin|confiduration|init to a higher value, if this not helps, then it yould be nice to look into your source,
also if it is designed simple as you stated

meikl ;-)
0
 
LVL 4

Author Comment

by:spk2000ar
ID: 6989058
Its a single user app.
I look at my code almost a hundred times but i don't get the error, which don't happens every time i do what i say. Sometimes does, but not most of the time.
The tables have this properties CachedUpdates FALSE, AutoRefresh TRUE and all the rest with its defaults values.
In BDE i got this:
AutoODBC FALSE
LocalShare FALSE
lowMemUsage 32
MaxBufSize 2048
MaxFilehandles 96
Memsize 48
MinBufSize 248
MTS Pooling FALSE
Sharedmemloct ''
Sharedmemsize 2048

Can any of this help to get me an idea of the solution???
Thanks for your efforts...!!!!!


0
 
LVL 2

Expert Comment

by:freshman3k
ID: 6989260
Hello,

LocalShare should be set to true it willo add more stability.You will get less corrupted tables and indexes. Or you can call
DBISaveChanges(Table1.Handle)
on the AfterPost event of all your Tables ,which is the same thing as LocalShare=true but without lock
files.

PdxrBld ,This is the best paradox repair utility Ive tried yet , and its freeware with source, so you can integrate Table Integrity cheching in your applicaion.You need
the Tutility Dll found at Borlands site to.

Tutility DLL.
http://www.borland.com/devsupport/bde/files

PdxrBLD.
http://www.rksolution.cz/Delphi/Delphi.htm

Goodluck.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Author Comment

by:spk2000ar
ID: 6990068
Either do that, all the tables in my applications get this code in the afterpost event:

With DataSet as TTable do;
  begin
    UpdateCursorPos;
    DbiSaveChanges(Handle);
    CursorPosChanged;
  end;
DataSet.Refresh;

But the problem exists....
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7796521
A request for deletion has been made.  If no objections, I will handle

Computer101
E-E Admin
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 0 total points
ID: 7854875
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
indy tidtcpclient threading issue 8 63
calling Tcolordialog in dll make the form disappear 8 103
Reconfigure Delphi Install? 2 45
Delphi inherited method 6 62
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now