pro_jsp thread: Re: How to dealing with single quote ( ' )
Thanks Tom,
Your code for dealing with 's works perfectly:
String iRname = request.getParameter("inpRname");
/*Handling apostrophies in a string for input into Access Database*/
StringBuffer b = new StringBuffer();
for (int i=0;i<iRname.length();i++)
{
char c = iRname.charAt(i);
if ((c=='\'')||(c=='\"')||(c=='\\'))
{
b.append('\'');
}
b.append(c);
}
iRname=b.toString();
Patrick
|





