Board index » delphi » Strange behaviour of SetRange

Strange behaviour of SetRange

Hello,

I've got strange problem with secondary indexes. There is a Paradox version
5 table (about 75 megabytes) with primary key and two secondary indexes.

Sometimes one of secondary indexes become "disabled" - there are records in
the table, but SetRange calls returns 0 matching records.

The table isn't corrupted, it opens normaly, repair utility using tutil.dll
says that there are no errors.

After that situation, all next appends to that table are "not visible" to
SetRange and other methods using that index.

When table is reindexed (which takes a while - it's quite big) everything
works fine.

What can cause that problem?

Michael Krawczyk
e-mail: krawc...@vmoon.com.pl

 

Re:Strange behaviour of SetRange


Is the index "maintained?"  Sounds like it isn't.

Quote
>Michael Krawczyk wrote:

> Hello,

> I've got strange problem with secondary indexes. There is a Paradox version
> 5 table (about 75 megabytes) with primary key and two secondary indexes.

> Sometimes one of secondary indexes become "disabled" - there are records in
> the table, but SetRange calls returns 0 matching records.

> The table isn't corrupted, it opens normaly, repair utility using tutil.dll
> says that there are no errors.

> After that situation, all next appends to that table are "not visible" to
> SetRange and other methods using that index.

> When table is reindexed (which takes a while - it's quite big) everything
> works fine.

> What can cause that problem?

> Michael Krawczyk
> e-mail: krawc...@vmoon.com.pl

--
------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)

- Show quoted text -

Quote
> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/products/chimneysweep

Re:Strange behaviour of SetRange


Quote
"Sundial Services" <i...@sundialservices.com> wrote in message

news:3A76C81F.60DB@sundialservices.com...

Quote
> Is the index "maintained?"  Sounds like it isn't.

Yes. It is maintained. And it worked fine.
_Sometimes_ it behave like that.
It happens that everything works for example for three days without a
problem, and sometimes it fails twice a day.

This table is very frequently used. Records are mainly appended to it (there
are no deletions or edits).
Other data:
- table type: Paradox
- table version: 5
- block size: 32K (we tried smaller block size also)
- field count: 23
- primary key size: 2 fields (A8, S)
- secondary key sizes:
* 3 fields (A1, A8, A8) (maintained, case-sensitive) - mostly used, this
index fails
* 4 fields (A8, A1, A8, A8) (maintained, case-sensitive)

There are no validity checks, referential integrity or dependent tables
defined in Paradox.

Michael Krawczyk
e-mail: krawc...@vmoon.com.pl

Re:Strange behaviour of SetRange


I don't think that the reapair utility for Paradox checks secondary
indexes.
Something to check:
Can you find all the records while reading the table on that secondary
index? If so, your SetRange instruction could be wrong.

Robby.
In article <956j3p$b6...@news.tpi.pl>,
  "Michael Krawczyk" <krawc...@vmoon.com.pl> wrote:

Quote
> "Sundial Services" <i...@sundialservices.com> wrote in message
> news:3A76C81F.60DB@sundialservices.com...

> > Is the index "maintained?"  Sounds like it isn't.

> Yes. It is maintained. And it worked fine.
> _Sometimes_ it behave like that.
> It happens that everything works for example for three days without a
> problem, and sometimes it fails twice a day.

> This table is very frequently used. Records are mainly appended to it
(there
> are no deletions or edits).
> Other data:
> - table type: Paradox
> - table version: 5
> - block size: 32K (we tried smaller block size also)
> - field count: 23
> - primary key size: 2 fields (A8, S)
> - secondary key sizes:
> * 3 fields (A1, A8, A8) (maintained, case-sensitive) - mostly used,
this
> index fails
> * 4 fields (A8, A1, A8, A8) (maintained, case-sensitive)

> There are no validity checks, referential integrity or dependent
tables
> defined in Paradox.

> Michael Krawczyk
> e-mail: krawc...@vmoon.com.pl

Sent via Deja.com
http://www.deja.com/

Other Threads