Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using CHRTRAN to search
Message
From
15/02/2012 04:45:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
14/02/2012 21:30:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01535424
Message ID:
01535435
Views:
87
>Hi. I want to be able to search my dbf (free) from a form with the "dashes, slashes and blanks" removed (for a more thourough Find).
>
>I am using the following on both my search criteria and the index for my database
>
CHRTRAN(itemno,'/- ','')
>with NO favorable results. Can someone tell me what I am doing wrong (or an article/example)?? I am using a SEEK. Should I be using SQL?

The seek should just work, provided you use the identical string in chrtran() as both index expression and the search expression. However, what may throw you off is the length of the term - chrtran() is removing characters and you're getting a variable length expression. Try
padr(CHRTRAN(itemno,'/- ',''), field_length)
instead.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform