aspose file tools*
The moose likes JDBC and the fly likes like preparedstatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "like preparedstatement" Watch "like preparedstatement" New topic
Author

like preparedstatement

Jackie Wang
Ranch Hand

Joined: Apr 18, 2002
Posts: 315
Anyone can help me with preparement statement with "like" syntax?
i am confused after reading
http://postgresql.linux.cz/mhonarc/pgsql-jdbc/2001-03/msg00074.html
Could you mind provide 1 example?
I really appreciated that.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Jackie,
My bet is that you'd get a much better response if you posted this in the JDBC forum. I don't use JDBC on a regular basis and, as it's not required for the SCJP exam, I doubt most people here use often.
Corey


SCJP Tipline, etc.
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Corey is rigth. I am moving it to JDBC forum.
what the hell JDBC means anyway


SCJP2. Please Indent your code using UBB Code
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by Jose Botella:
Corey is rigth. I am moving it to JDBC forum.
what the hell JDBC means anyway

It's funny, most people think JDBC stands for Java Database Connectivity but, according to Sun, it doesn't. Rather, it's just a neat acronym that sounds nice. Go figure. :roll:
Corey
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

keep in mind that every driver/database combo deals with special characters differently. Some escape all special characters, some escape only single quotes. So you'd have to find out from your jdbc driver documentation how your specific driver handles the special character %. If it escapes it, your search is looking for the % literally. If it doesn't escape it, then it will work as the intended wildcard. The same code used in the example you've linked to works fine as a wildcard search using classes12.zip Oracle drivers to an Oracle 8.1.7 database.
Jamie
[ May 14, 2002: Message edited by: Jamie Robertson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: like preparedstatement