hi:
    i'm met this question,this because your text field include character "\'".
in SQL statement,it's look as separater.
   eg: when you insert "b'day" as the third field into table.
SQL statement is:    insert into table values('aa','bb','b'day'.....)
    at this time, it cause SQLException: "comma wanting";
    how can we aviod this problem?
    i'm througth two ways
    one is: not permit input "\'" at text field.
    the other is: before insert,use other character replace it.
    eg:
   <%     String tmpstr=request.getParameter("strwithspe");
        tmpstr=tmpstr.replace("\'","~");
%>
    user "~" replace "\'",
    when you get data from database,you must replace character "~" with "\'".

                                                                    ok?

----- Original Message -----
From: Kotireddy Mutyam <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 05, 2000 3:56 PM
Subject: how to insert a filed consisting of single quote in msaccess?


> hi friends,
> I am working on JSP using JRun with MSAccess as a Database.
> I am not able to insert a field for example if i enter the value in text
>       field like "b'day" it is throwing exception. How to overcome the
>       error?
> TIA
> kotireddy
> [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> 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".
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

Reply via email to