Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By eckart

Thread: updateRow corrupts row in mysql database

  1. #1
    eckart is offline Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Default updateRow corrupts row in mysql database

    Hello,

    I am using the mysql server on localhost and netbeans.
    I experienced the problem with ResultSet, that after any update of a row (e.g. updateBoolean...) and subsequent updateRow() the the columns in that row in the database, which contain plain text, get corrupted, i.e. special characters (Umlaute in German) get corrupted.

    The parameter character-set-server in the mysql server is set to "latin1". Can this be the problem? I did not succeed to set it to "utf8".

    Can anyone help?

    Regards, Eckart

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default Re: updateRow corrupts row in mysql database

    Yes, that IS the problem as Java Strings use, per default UTF-8 so you will need to convert those character sets, or just make sure that the properties for your jdbc driver are set properly, as per default, the jdbc driver will be set to use utf-8 as well (if I remember right). You would be best off getting the mysql server to run using utf-8.

    Edit: It will, at least, in the end, be much less hassle, no matter how long it takes.

  3. #3
    eckart is offline Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Default Re: updateRow corrupts row in mysql database

    Thanks, masijade, for your reply. Indeed, the parameter character-set-server in mysqld was the problem. I succeeded to set it to utf8. Problem solved
    DarrylBurke likes this.

Similar Threads

  1. FTP corrupts images
    By AnishThomas in forum New To Java
    Replies: 4
    Last Post: 09-15-2011, 03:57 PM
  2. What is url of my database? MySql WorkBench
    By JavaDreams in forum JDBC
    Replies: 1
    Last Post: 03-14-2011, 10:28 AM
  3. Replies: 2
    Last Post: 02-11-2009, 04:43 AM
  4. ResultSet.updateRow() problem
    By kvikas in forum Advanced Java
    Replies: 1
    Last Post: 04-22-2008, 03:11 AM
  5. problem with ResultSet.updateRow()
    By kvikas in forum New To Java
    Replies: 0
    Last Post: 04-14-2008, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •