Solved

Index corruption with Paradox ???

Posted on 2002-05-03
6
318 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10 Round Image 2 189
Magic Software info 18 143
Press three keys together and trigger a function 3 67
How to load 2 images in same column in Delphi 2 68
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

749 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