1. JSP Forum (3 messages)

    Hi,

    I'm currently doing the JSP forum & using the MySQL. I encountered 1 minor problem, which is that i can't insert a '(apros) into the database. Is there a way to solve it? i tried using ".replace()" but it says invalid char.

    And also is there a way to increase the no. of characters that can be stored in the MySQL. From what i know, database can only store 255 characters.

    Please advice... Thanks!!!!

    Threaded Messages (3)

  2. JSP Forum[ Go to top ]

    try using "binary" -flag in your sql -clause.

    you can store more than 255 chars in mysql, just use some other datatypes than varchar. for example, text or blob.
    see http://www.devshed.com/Server_Side/MySQL/Intro/page3.html

    or www.mysql.com for more details of mysql datatypes


    Regards,
    Kari
  3. JSP Forum[ Go to top ]

    I am not sure about mySQL, but in Oracle u need to escape by adding an additional '. So if you need to insert text'here
    you would put in something like this
    insert into testvalues('text''here');
    Hope this helps
  4. JSP Forum[ Go to top ]

    Thanks!!!