Gerry Lang
|
| Posted: 11/09/2002, 8:48 PM |
|
Hello all!
I'm using CC 2.0 ASP with templates with a Visual FoxPro Database DBC/DBF and I noticed that searching is case sensitive. 'question is, how can I make the search features case insensitive?
TIA,
Gerry
|
|
|
 |
TimX
|
| Posted: 11/12/2002, 6:59 AM |
|
Gerry,
You should apply the functions which convert the string into given case to parameter and field value.
As for ASP use LCase() and/or UCase() functions (I’m not sure which one should be used in FoxPro). ASP surround the parameter value with function, It could be done in form Open event:
e.g.
if GetParam("name") <> "" then
sWhere = replace(sWhere, "& GetParam("name") &", "& LCase(GetParam("name")) &")
'and apply foxpro function to the field
sWhere = replace(sWhere, "field1", "fox_pro_function(field1)")
end if
|
|
|
 |
Brent
|
| Posted: 11/12/2002, 8:13 AM |
|
Case insensitive searching depends a lot on the database you're using. MySQL for example allows for case insensitive searching by default which means you don't need to tweak the SQL. It is automatic and fast.
|
|
|
 |
Gerry
|
| Posted: 11/13/2002, 9:34 PM |
|
Thanks for replying to my question Gentlemen. I'll try using Ucase.
|
|
|
 |
|