• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert problem with special characters

 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am querying a web service and am getting this value from a particular field: File H:\100���������������\�����������\�����������.exe: detected virus ''IM-Worm.Win32.Sohanad.t''. When i try to insert into the database, it gives an error--Invalid Character. I am not sure how to handle this scenario. Could anyone guide me how to handle this?

Thanks,
Visu Nekk
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the database field configured to accept binary data (which is what that looks to me)? Or is the text encoded in Unicode (I can't tell from the post) - then the DB needs to be set up to use Unicode.
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

I tried to insert the same record from sqlplus prompt, and it worked. Maybe it's from Java side.

Thanks,
Visu Nekk
 
Selva jai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[ UD: Hijack removed. Please start a new topic for questions unrelated to this one. ]
[ January 25, 2008: Message edited by: Ulf Dittmer ]
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Any update on the mentioned query? What character set is it exactly and how to handle it? Please guide me.

Thanks,
Visu Nekk
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you answered the questions I asked we might be able to help. Otherwise, we don't have enough information to go by.
[ January 25, 2008: Message edited by: Ulf Dittmer ]
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

Unicode support is enabled on the database. The application is deployed in jboss on a linux box and we are using a data source to obtain a database connection. Does it have anything to do with jboss?

Thanks,
Visu Nekk
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. And is the data actually Unicode? Or is it binary?
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

From the web, I found the data to be ISO character set.

Thanks,
Visu Nekk
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So does that mean your problem is solved?
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

I am unable to figure it out. The insert statement is a batch update that worked fine on test database. Please help me, what could have been the problem.

Thanks,
Visu Nekk
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you figured out if what you're trying to insert is valid text (however encoded) or if binary characters have slipped in?

Which character is it that triggers the exception (if you don't know, capture the message and try to insert it manually, leaving off character by character until the error no longer occurs).
 
Sidd Nakade
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that \ creating problem. does that need an escape character if used in JAVA.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic