title: Should I be using JDBC getNString() instead of getString()?
body: <p>We are building a Java application backed by an Oracle database that we access using JDBC (drivers <code>ojdbc6.jar</code> and <code>orai18n.jar</code>). The database schema stores text columns primarily using the <code>NVARCHAR2</code> data type.</p>
  
  <p>The <a href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getNString%28int%29">JDBC documentation</a> for the JDBC <code>ResultSet</code> says that <code>getNString()</code> is particularly intended for use with the NCHAR, NVARCHAR etc. data types, but at the moment we are only using <code>getString()</code>.</p>
  
  <p>This seems to work fine, so I am wondering why I should use <code>getNString()</code> rather than <code>getString()</code>. Is <code>getString()</code> going to start failing if non-ASCII characters are entered, or is the Oracle JDBC driver indifferent as to which method I should use?</p>
  
  <p>EDIT: Seems that it may be database-dependent: <a href="http://social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/8e0d9743-241e-4b09-b3a2-137238c02bf1">SQL Server doesn't seem to mind which you use</a>, depending on the connection parameters. Does anyone have any specific information on Oracle?</p>