• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

like preparedstatement

 
Jackie Wang
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Corey is rigth. I am moving it to JDBC forum.
what the hell JDBC means anyway
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic