Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Jeff Price

Greenhorn
+ Follow
since Jan 31, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jeff Price

If your DB is read-intensive, and you are interested in one or very few columns to case-insensitive search, you could have a trigger and an extra column that automatically store a copy of the column in all upper (or lower) case, then search on that.
If you don't like that, try the following (as been previously suggested):
StringBuffer sql = new StringBuffer();
String thingToFind = "My Thing";
sql.append("SELECT columns FROM table WHERE ");
sql.append("UPPER(fieldToSearch) = '" + thingToFind.toUpperCase() + "'");
Are you worried about the password being read from your source code, as it flies across the network, or what?
I read my password out of an INI file, where it is encrypted (weakly, but keeps people from reading it easily).
It could still be read off the wire, but no simple way to solve that. Keeps it out of the source code, too.