You need to append a second single quote - it's not an Oracle thing,
but rather, a DB thing. Try the following - take note it will not
matter where the single quote is it will append another to it.
public String apQuote(String s ) {
StringBuffer result = new StringBuffer();
for (int i=0;i<s.length();i++) {
char c = s.charAt(i);
if (c!=39){ result.append(c);
}else{
result.append(c);
} //end if
}
es = result.toString( );
return es;
}
----- Original Message -----
From: "R.Muthukumar" <[EMAIL PROTECTED]>
Date: Wednesday, March 21, 2001 4:22 am
Subject: Problem in inserting data into Oracle
> Hi!
> From the Jsp page, I am trying to update a record in oracle .
> Since oracle
> doesn't allow to enter values like the string given below...
> This is the string with check's and result's.
> I have to convert the single quotes into double quotes and
> insert..? Can
> anyone throw some light on how to go about that?
> Thanks in advance..
> Muthu
>
>
========================================================================
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-
> INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets