Solved

Index corruption with Paradox ???

Posted on 2002-05-03
6
313 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
Comment Utility
?
>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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Author Comment

by:spk2000ar
Comment Utility
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
Comment Utility
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
Comment Utility
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

6 Experts available now in Live!

Get 1:1 Help Now