A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
Keeping quotes from column in my table?
Moined Mogul
Ranch Hand
Joined: Jul 11, 2001
Posts: 33
posted
Aug 08, 2001 12:55:00
0
Does anyone know how I could ensure that quotes were never permitted to be added into my database table where the input is coming from user input in a
JSP
???
Jamie Robertson
Ranch Hand
Joined: Jul 09, 2001
Posts: 1879
I like...
posted
Aug 08, 2001 13:56:00
0
can you not just check for a quote in the
String
before you insert into the database?
int i = str.indexOf("\""); //find quote in String str if (i != -1) //quotation found { //error routine } else { //insert into database }
Jamie
[This message has been edited by Jamie Robertson (edited August 08, 2001).]
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Keeping quotes from column in my table?
Similar Threads
Escape single quotes
SQL syntax
dynamic jsp page (can't include %>)
Creating an HTML table in a Bean
How to escape quote characters (")?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter