This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes insert query for mysql  convert() using the tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "insert query for mysql  convert() using the tomcat" Watch "insert query for mysql  convert() using the tomcat" New topic
Author

insert query for mysql convert() using the tomcat

zita lakshmi
Ranch Hand

Joined: Nov 13, 2009
Posts: 37

Hi


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




it have error.


so any one of them help me
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Shouldn't you convert each column separately?
Moving to JDBC.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
zita lakshmi wrote:it have error.


And what does the error say..?


OCJP 6 (93%)
zita lakshmi
Ranch Hand

Joined: Nov 13, 2009
Posts: 37

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

Joined: Nov 13, 2009
Posts: 37
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

Joined: Aug 13, 2007
Posts: 58
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


Thanks,
Prabhat
SCJP 1.5, SCWCD 1.5, SCBCD 1.5
zita lakshmi
Ranch Hand

Joined: Nov 13, 2009
Posts: 37


hi


Mysql accept arabic charset.


Os version is window XP


 
GeeCON Prague 2014
 
subject: insert query for mysql convert() using the tomcat