• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQL Server replacing characters

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whenever I attempt to retrieve my data from an SQL Server database or a MSAccess database characters like apostrophes ' or double quotes " are changed into other characters such as / and ?. I've checked the database and the data is correct. Has anyone else experienced this problem and does anyone know a solution?
 
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How is the data stored in your database? Are they stored as ' and " marks?
 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dale DeMott:
How is the data stored in your database? Are they stored as ' and " marks?


They're stored as " and '. I have noticed though that if I copy a cell out of access and paste it into, say, notepad I get a formatted ' like Word would do.
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it always the same characters that appear instead of the apostrophe and double quote?
What JDBC driver are you using? JDBC - ODBC bridge?
What happens with Oracle or mySQL?
 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is always the same characters. I've found out that Microsoft format their single and double quotes like they would in word, instead of the conventional ' or "
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rik,
SQL Server is doing this too? I'm not sure I understand what you mean. Surely the character stored in the database is just the character. When is it being formatted, and what is formatting it? The JDBC driver or the database?
reply
    Bookmark Topic Watch Topic
  • New Topic