Solved

Index corruption with Paradox ???

Posted on 2002-05-03
6
317 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
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 shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

839 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