Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5960359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:48:58+00:00 2026-05-22T18:48:58+00:00

I have a problem with setting a range on a secondary index in a

  • 0

I have a problem with setting a range on a secondary index in a Paradox 7 table using Delphi2010.

The relevant fields are:

FeatureType (int); YMax (int); XMax (int); YMin (int); Xmin (int).
The secondary index contains all these fields in this order.

I tested using a SetRange statement like so (not necessary to add all field values, rest is assumed NULL and all values are included):

table1.IndexName := 'YMaxIndex';
table1.SetRange([101, 280110400],[101, 285103294]); //386236 records

And tried to get a 0 result by adding to the constraints:

table1.IndexName := 'YMaxIndex';
table1.SetRange([101, 280110400, 1],[101, 285103294, 1]); //386236 records

But still gets 3863236, which is clearly incorrect when checking the values in the XMax field in the table.

Can someone please explain to me what I am not understanding about Paradox index and SetRange? I have used similar code frequently but not necessarily with 3 fields specifying the range.

Update

See Uwe’s response below. The final code solution follows (new ranges for XMax):

Table1.SetRange([101,280110400], [101,285103294]);
Table1.Filter := 'XMax > 100000 and XMax < 110000';
Table1.Filtered := true; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:48:59+00:00Added an answer on May 22, 2026 at 6:48 pm

    An index range is always taken as a whole over all fields and not looking for each field individually. The result set will contain every record that is in between those ranges. The comparison is made for each index field in the given order.

    In your case it will check if the record’s FeatureType lies in between 101..101. If the field contains 101 it is taken into consideration. As the field value lies at the border of the range, the next fields are checked.

    If the YMax field lies in between 280110400..285103294 and the value doesn’t match the borders (280110400 or 285103294), it is taken into the result set without any further checking. In that case the remaining index fields are not checked.

    The result you are trying to get is only possible with a filter condition – or with an appropriate SQL Select clause.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with setting the TTL on my Datagram packets. I am
I have encountered a problem that I have not come accross yet when setting
I have a problem using the Java search function in Eclipse on a particular
the problem I'm facing is this: I have a textbox for a date range
I have strange problem with the delay function here using the HTML function with
I have a problem with a durable client on ActiveMQ. I am using stomp.py
I have a look up table for isAlpha. for (int i = 0; i
Suppose I have a table (MySQL) like this: CREATE TABLE sessions ( session_id INT
I have a problem setting up an animation. The first imageview starts animating and
I have a problem setting height after the document is loaded heres code pieces:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.