🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #439

How to set Range for more than one field of Paradox7 table

#439
From: shi-china
Date: Fri, 19 Oct 2001 11:31
76 lines
3098 bytes
Hi,

Who can help me? Is it possible to set Range for more than one field of
Paradox7 table with C++ Builder 5.0? My program is as follows:

        Table1->Open();

          // The Secondary Index "Index1" is composed of 2 fields "Aaa;
Bbb"
        Table1->IndexName = "Index1";

        Table1->SetRangeStart();
        Table1->FieldByName("Aaa")->AsString="a";
        Table1->FieldByName("Bbb")->AsString="a";

        Table1->SetRangeEnd();
        Table1->FieldByName("Aaa")->AsString="j";
        Table1->FieldByName("Bbb")->AsString="b";

        Table1->ApplyRange();

There are only 5 records in it the table "tryRange.DB":

   Aaa   Bbb
----------------
    a        a
    b        b
    c        c
    j         j
    k        k

After running my program, all the records in tryRange.DB are shown. Then
click the button RANGE, and the Ranged records show like the follows:

   Aaa   Bbb
-------------
    a        a
    b        b
    c        c

It can be found that the range condition for the field "Bbb" doesn't
work. Could you please tell me why?

Moreover, if it is only the range for the field "Aaa", the result seems
not correct, either. I guess for the range of "Aaa" the result should be

   Aaa   Bbb
-------------
    a        a
    b        b
    c        c
    j         j

The other info about my program is:

About the database alias:

Type:                          STANDARD
DEFAULT DRIVER:   PARADOX  ( my database type is Paradox 7 )
ENABLE BCD:           FALSE
PATH:                         (the folder of the database "tryRange.DB")

About the table "tryRange.DB":

It is created with Database Desktop. Two fields "Aaa" and "Bbb" are
Alpha type. Both of them are Key fields. The Secondary Index is
"Index1", which is composed of "Aaa; Bbb".

I guess it may be a problem of Paradox in my computer. Could you
recommend me another type of database. I once used Access database. But
it's quite complicated to set up all the parameters, such as User Name,
when other users want to use my program.

Lots of thanks again.

Yiping
Technical Details
Message-ID: <3BD00F2C.58DA1D78@mails.tsinghua.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!sjcppf01.usenetserver.com!usenetserver.com!newsfeeder.randori.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,96489a1d91787577,start
X-Google-Attributes: gidfcd2b,public
X-Google-ArrivalTime: 2001-10-19 04:28:55 PST
Message-ID: <3BD00F2C.58DA1D78@mails.tsinghua.edu.cn>
Date: Fri, 19 Oct 2001 13:31:56 +0200
From: shi-china <ypshi97@mails.tsinghua.edu.cn>
X-Mailer: Mozilla 4.7 [de] (WinNT; I)
X-Accept-Language: de
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.multi-tier
Subject: How to set Range for more than one field of Paradox7 table
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 131.188.113.95
X-Trace: dnews 1003490254 131.188.113.95 (19 Oct 2001 04:17:34 -0700)
Lines: 78
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!sjcppf01.usenetserver.com!usenetserver.com!newsfeeder.randori.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews