Solved

Index corruption with Paradox ???

Posted on 2002-05-03
6
319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

724 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