Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert query for mysql convert() using the tomcat

 
zita lakshmi
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi


I need insert query for mysql convert() using the tomcat




it have error.


so any one of them help me
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't you convert each column separately?
Moving to JDBC.
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
zita lakshmi wrote:it have error.


And what does the error say..?
 
zita lakshmi
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi

Thanks for your reply. I have using for the following code



but it have the following error message.

Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') using utf8, convert('اليتا') using utf8)' at line 1"

how can i insert the arabic data properly. please help me.
 
zita lakshmi
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai

Manually i tried to insert the data in mysql. but i have following error.



Error

SQL query:

INSERT INTO arabiccontent( `id` , `name` )
VALUES (
convert( "444" )
USING utf8, convert( "وكيل إدارة" )
USING utf8
)

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') using utf8, convert("وكيل إدارة") using utf8)' at line 1



Please help me
 
Prabhat Jha
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which OS are you running on and what is the version of MySQL that you are using ? MySQL 4.x had similar problems.

Just to double check that your version supports Arabic can you check SHOW CHARSET shows you arabic or not ?

Thanks

 
zita lakshmi
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


hi


Mysql accept arabic charset.


Os version is window XP


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic