FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper How can we get the record like "Multi scope"?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How can we get the record like "Multi scope"?
Posted: Sat Jun 02, 2007 05:07 PM

I've used Clipper5.2/FW2.5/Comix.

I would like to scope the databse by cmxSetScope(..,..) but some records is not the continue records.

example

Index on type+upper(name) tag ....
Type Name
----- --------------------
A John
A Jim
B Jonatan
B Sim
C Jane

How can I use scope to get all name with "J" from above index by do not use array, because the record is greater than 100,000 records.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How can we get the record like "Multi scope"?
Posted: Sat Jun 02, 2007 05:12 PM

You can't. Just create an index on upper(name) and use it to set a scope on "J".

EMG

Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How can we get the record like "Multi scope"?
Posted: Sat Jun 02, 2007 05:18 PM

Dear Enrico,

I have 12 index tags with starting by "Type". If I create new set of index it means 24 index tags. I try to use cmFilter() but it is a little bit slow. Can I have another solutions.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
How can we get the record like "Multi scope"?
Posted: Sat Jun 02, 2007 05:24 PM

No, sorry.

EMG

Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM
How can we get the record like "Multi scope"?
Posted: Mon Aug 06, 2007 08:51 AM

What do you think about something like this ?

for i = 65 to 90
cKey := chr(i) + "J"
seek cKey
do while left(name,1) = "J"
....
enddo
next

Best Regards,

Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Solution to almost all your indexes.
Posted: Mon May 26, 2008 10:19 AM

Dutch:

Why don't you index on Name and create bitmaps for the Type field ?
You will have just one index and the same number of bitmaps as of types.
You'll reap the benefits of faster processing and less index maintenance. The only overhead (small) is when you add/update records that you have to update the bitmap for the particular type.

Remember to update / create the bitmaps when re-indexing or indexing your files.

Continue the discussion