× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
NielsGron reported 2016-09-12T14:25:07Z  · tariqrahiman last modified 2016-10-19T16:13:36Z

Importing with Import Tool to SQL Server on NVARCHAR column with Batch will fail


customer request
Priority Major
Complexity Unknown
Component Tools - Import Tool
Version 17.0

If you import data with the Import Tool into a SQL Server table with NVARCHAR column using the BATCH option, it will fail.  See attached screenshot.

If you import with FULL option it will work.

The exception is failing on the method call PreparedStatement.setNString() in the jTDS driver :

https://docs.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html#setNString(int,%20java.lang.String)
https://docs.oracle.com/javase/7/docs/api/java/sql/PreparedStatement.html#setNString(int,%20java.lang.String)
https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html#setNString(int,%20java.lang.String)

Doing a search for "getNString" in the source code for jTDS in net.sourceforge.jtds.jdbc.JtdsPreparedStatement.java and JtdsStatement.java does not yield a result.  This would cause the exception above, but it is odd that the method doesn't exists since the method is part of the JDBC API and part of the PreparedStatement interface.

Also, notice in ImportThread line 1225 we specifically don't call PreparedStatement.setNString() for Netezza, while we do for all others. (issue #11400)

Here is a StackOverflow thread on the topic :
http://stackoverflow.com/questions/12575194/jtds-jdbc-driver-getnstring-throws-error

2 attachments

Issue #14692

Closed
Fixed
Resolved 2016-09-12T19:30:18Z
 
 
Completion
No due date
Fixed Build 17.0.8-4
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017