• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Request to the moderator

Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution my self
I request the author of this site must keep this as a FAQ's in JDBC section

This problem is the most frequesnt one.

I am explaining it again
when ever we copy the data from microsoft word document to Textarea of HTML page then the single Quotes(') and double Quotes (") will be changed to some other ASCII char
so, In the servlet we take the request from the user using String

char ch1=(char)146;//here 146 is the ASCII code of singleQuote(singlequote of ms word not an actual single quote)

char ch[] =new char[]{ch1};
StringBuffer sb1=new StringBuffer();
String token=new String(ch);
StringTokenizer st1 = new StringTokenizer(data,token);
sb1.append(st1.nextToken() +"\'");
System.out.println(sb1.toString());//here it diplays actual single quote

after getting the actual single quote we can then insert the data into database(table).

In the same way we need to convert the doubleQuote with it's ASCII code.

I hope you will accept my request.

Thanking you sir,

Posts: 43011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The FAQ section is actually a Wiki, so you can add any questions and answers you see fit yourself.
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the JDBC FAQ is a wikki, which (braodly speaking) means you are welcome to go there and update the section with the entry your self!

Happy typing!

Why is the word "abbreviation" so long? And this ad is so short?
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!