How can we get the record like "Multi scope"?

How can we get the record like "Multi scope"?

Postby dutch » Sat Jun 02, 2007 5: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
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How can we get the record like "Multi scope"?

Postby Enrico Maria Giordano » Sat Jun 02, 2007 5:12 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby dutch » Sat Jun 02, 2007 5: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
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Enrico Maria Giordano » Sat Jun 02, 2007 5:24 pm

No, sorry.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby avista » Mon Aug 06, 2007 8: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,
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Solution to almost all your indexes.

Postby HunterEC » 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.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 2 guests