dbTalk Databases Forums  

Setgenfilter() problem

comp.databases.paradox comp.databases.paradox


Discuss Setgenfilter() problem in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John
 
Posts: n/a

Default Setgenfilter() problem - 06-15-2006 , 04:54 AM






Hello All,

I have a table containing several fields, one of which is Client_ID
(A7). The key field is Order_No which is a Long Integer.

Several orders have the same Client_ID. It is on the Client_ID field I
wish to filter.

The Problem:
For example if the Client_ID is: SMITH1 or SMITH10 or any combination
of Letters and Numbers provided the Client_ID starts with a Letter the
SetGenFilter() works correctly.

Even If the Client_ID is all numbers such as 200601 or 200610 ect
providing the ID does not contain any letters the filter works
correctly.

However if the ID is a combination of numbers and letters with the
first character being a number such as 1SMITH, 2SMITH or 2006SM the
filter fails.

Other than changing the Client_ID to Start with a letter is there any
way of forcing the filter to work correctly?

Is this a known problem?

Using Paradox8
WinXP

Any explanation would be appreciated.

John


Reply With Quote
  #2  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: Setgenfilter() problem - 06-15-2006 , 05:23 AM






John

From the Paradox help files

If you are filtering on special characters, you must precede the number
or literal value that can be interpreted as an operator, such as ", /,
\, -, +, =, with a backslash(\). In the OPAL method setgenfilter(), the
filter criteria is put into a string and parsed to pick out numbers and
operators for calculations. If the number or operator in the filter
needs to be interpreted literally, it needs to be preceded by a
backslash(\).
For example, to filter a table with the following records:

· 1st Base
· 2nd Base
· 3rd Base

and retrieve only those that start with "1st," the filter would be this:

filter = "\1st.."

One backslash to indicate that number 1 is not a special character.


--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply

Reply With Quote
  #3  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: Setgenfilter() problem - 06-15-2006 , 09:20 AM



You may also want to look at creating a secondary index and using setrange.
It is MUCH faster than a filter.

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits
since 1982



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.