0

SQL Server 2005 でエラーが発生し始めました

Datanucleus 2.x でアプリをテストしたのはこれが初めてです (最後のテストは DN 1.x で行われました)。

私はEclipse RCPを使用しています。

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The ntext data type cannot be selected as DISTINCT because it is not comparable.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPrepared
Statement.java:390)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java
:283)
at org.datanucleus.store.rdbms.SQLController.executeStatementQuery(SQLController.java:463)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecuteInternal(JDOQLQuery.java:755)
... 5 more
4

1 に答える 1

0

最初の行が言及しているように、ntext タイプのフィールドを内部に持つ結果セットに対して DISTINCT を実行しようとしています..これは不可能です..

SQL Server 2005 でテキスト (または ntext) で DISTINCT またはグループ化する方法はありますか? をご覧ください。可能な解決策のために。(フィールドを nvarchar(max) にキャストします)

于 2010-10-10T10:51:48.227 に答える