Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Text to NText, Varchar to NVarchar

843854Feb 8 2005 — edited Jun 22 2005
Hello,

I currently have an app on SQL Server which has text and varchar datatypes throughout. I've noticed that some characters that are entered into the database get stored as ?. This problem went away when I changed one of my text fields into "ntext". So now I'm thinking that I need to change all varchars to nvarchars, and all text types to ntext. This would at least allow me to store any characters my users could throw at the app, unicode or not.

What difficulties should I expect when I do this? I've seen lots of posts regarding difficulties inserting and retrieving data that is ntext or nvarchar, but many of these posts are old (2001 or earlier), or use different JDBC drivers (I'm using the INET driver). I don't know which of these issues will catch up to me. It sounds like I will need to modify a lot of my sql, but I'm not sure where yet. Can anyone post some of their experiences when making this conversion? What changes did you have to make to get things to work? I use many Statement objects and PreparedStatement objects, using stmt.setString(), rs.getString()., etc....

Michael
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2005
Added on Feb 8 2005
6 comments
357 views