Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Miscellaneous Functions to go.

Status
Not open for further replies.

Aristarco

Programmer
Jun 19, 2000
77
0
0
MX
I have coded some functions I believe you'd want to use. They're all related to strings.
One of it,
Code:
IsSeparator(Char)
returns true if the current character is a separator included in a list. Separator can be
Code:
,.:;/?"
and space. The list can be edited to add or substract characters. This function is used by the other functions.

Code:
PutUppers(Phrase)
converts to Upper Case the first letter of every word in a phrase, except 'the', 'of', 'from', etc. The list can also be edited to add or substract the words to ignore. e. g. if you apply it to "the quick brown FOX JUMPED OVER the fence", it returns "the Quick Brown Fox Jumped Over the Fence".

Code:
MakeSQL(Phrase, Field)
is used to make a WHERE clause from a phrase. e. g. If you write
Code:
MakeSQL("Corn, Coffee, Rice","Product")
it returns
"([Product] Like 'Corn' OR [Product] Like 'Coffee' OR [Product] Like 'Rice')"

Code:
MakeNotSQL(Phrase, Field)
does the same but uses "Not Like" and "AND" instead of "OR"

If you want them just let me know. They're all intended for Spanish, but I can send you an English version. Anyway they're all documented so you can modify them at will. Hope this help you all.
 
Maybe we ought to have a Useful bits of code Forum. I would think it would some sort of policing though cos we could end up with a lot of repetition? Peter Meachem
peter@accuflight.com
 
I would like a copy of those functions. If you would be so kind...... you can e-mail me at traffas7@prairieinet.net many thanks
Shawn
 
Put them in an FAQ (like "Helpful String Functions"). You can then refer people to them using the FAQ link. Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
 
Dear Aristarco,

If you have an English Language Version I too would love a copy and thanks for the effort you have gone to.

My email address is james.maidment@oceanfree.net
and Happy Easter.

Regards Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top