Index: ../src-rep/src/apps/datastudio/com/aquafold/datastudio/tools/importtool/ImportThread.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- ../src-rep/src/apps/datastudio/com/aquafold/datastudio/tools/importtool/ImportThread.java (revision 57581) +++ ../src-rep/src/apps/datastudio/com/aquafold/datastudio/tools/importtool/ImportThread.java (revision ) @@ -275,6 +275,9 @@ // First attempt to use prepared statements if (usePreparedStmt) { if (preparedStmt == null) { + if (cp.isInterbase()) { + intoOpenTableQ = intoCloseTableQ = ""; + } sql = generatePreparedInsert(record, is.table, " ", intoOpenTableQ, intoCloseTableQ); try { preparedStmt = conn.prepareStatement(sql); @@ -287,7 +290,14 @@ } if (usePreparedStmt && preparedStmt != null) { prepareStmt(preparedStmt, record, warningMessages, escapeBackslash); + if (cp.isInterbase()) { + // The preparedStmt.executeBatch() will block and never return if there are small BLOB values, and throw exception if there are large BLOB values. + // Thus we have to do preparedStmt.executeUpdate() individually here. + preparedStmt.executeUpdate(); + } + else { - preparedStmt.addBatch(); + preparedStmt.addBatch(); + } increment(); } else if (useMultiRecordsStmt) { @@ -526,8 +536,14 @@ // Execute the batch if has not be executed try { if (preparedStmt != null) { + if (cp.isInterbase()) { + // Do nothing here since we already do preparedStmt.executeUpdate() in the main loop. + // The preparedStmt.executeBatch() will block and never return if there are small BLOB values, and throw exception if there are large BLOB values. + } + else { - preparedStmt.executeBatch(); - } + preparedStmt.executeBatch(); + } + } else if (batchStmt != null) { batchStmt.executeBatch(); } @@ -1599,7 +1615,7 @@ if (cp.isOracle()) { stmt.setBytes(idx, bytes); } - else if (cp.isTeraData()) { + else if (cp.isTeraData() || cp.isInterbase()) { setBinaryStreamSpecial(stmt, idx, columnObject); } else if (cp.isSybaseASE() || cp.isSybaseAnywhere()) { @@ -2358,6 +2374,9 @@ private boolean usePreparedStatement(ConnectionProperties cp) { if (cp.isSybaseASE() || (cp.isSybaseIQ() && cp.isSybaseIQ(ConnectionProperties.MATCH_EQUAL_OR_GREATER, ConnectionProperties.VERSION_SYBASEIQ_15_2) && cp.useSybaseIQiAnywhereDriver())) { return is.sybaseEnableBCP; + } + else if(cp.isInterbase()){ + return true; } else if(cp.isSybaseAnywhere()){ return true;