From 59d63dd9a99c31ebff586cee883dbc6fc6055b47 Mon Sep 17 00:00:00 2001 From: iroqueta Date: Thu, 19 May 2022 18:51:29 -0300 Subject: [PATCH 1/4] Dameng DBMS first implementation Issue: 96184 --- java/pom.xml | 6 + .../com/genexus/db/driver/GXDBMSdameng.java | 246 ++++++++++++++++++ 2 files changed, 252 insertions(+) create mode 100644 java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java diff --git a/java/pom.xml b/java/pom.xml index 320b93a27..f137f4607 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -265,6 +265,12 @@ 10.2.0.jre8 runtime + + com.dameng + DmJdbcDriver18 + 8.1.2.79 + runtime + diff --git a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java new file mode 100644 index 000000000..44a9db86f --- /dev/null +++ b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java @@ -0,0 +1,246 @@ +package com.genexus.db.driver; + +import java.io.InputStream; +import java.sql.*; +import java.util.Date; + +import com.genexus.CommonUtil; + +public class GXDBMSdameng implements GXDBMS +{ + public void setDatabaseName(String dbName) + { + } + public String getDatabaseName() + { + return ""; + } + public void setInReorg() + { + } + public ResultSet executeQuery(PreparedStatement stmt, boolean hold) throws SQLException + { + return stmt.executeQuery(); + } + + public int executeUpdate(PreparedStatement stmt) throws SQLException + { + return stmt.executeUpdate(); + } + + public boolean execute(PreparedStatement stmt) throws SQLException + { + return stmt.execute(); + } + + public int[] executeBatch(Statement stmt) throws SQLException + { + return stmt.executeBatch(); + } + + public boolean isAlive(GXConnection con) + { + try + { + serverDateTime(con); + } + catch (SQLException e) + { + return false; + } + + return true; + } + + + public boolean DataTruncation(SQLException e) + { + return false; + } + private DataSource dataSource; + public void setDataSource(DataSource dataSource) + { + this.dataSource = dataSource; + } + + public boolean useReadOnlyConnections() + { + return true; + } + + public boolean EndOfFile(SQLException e) + { + return ( e.getErrorCode() == 1403 || + e.getErrorCode() == 100 + ); + } + + public boolean ReferentialIntegrity(SQLException e) + { + return (e.getErrorCode() == 2291); + } + + public boolean DuplicateKeyValue(SQLException e) + { + return (e.getErrorCode() == -6602); + } + public boolean ObjectLocked(SQLException e) + { + return ( e.getErrorCode() == 54 + ); + } + public boolean ObjectNotFound(SQLException e) + { + return ( e.getErrorCode() == 942 || + e.getErrorCode() == 950 || + e.getErrorCode() == 1418 || + e.getErrorCode() == 1432 || + e.getErrorCode() == 2289 || + e.getErrorCode() == 2443 || + e.getErrorCode() == 4080 + ); + } + public java.util.Date nullDate() + { + return CommonUtil.ymdhmsToT_noYL(1, 1, 1, 0, 0, 0); + } + + public boolean useDateTimeInDate() + { + return false; + } + public boolean useCharInDate() + { + return false; + } + + + public void setConnectionProperties(java.util.Properties props) + { + props.put("fixedString", "true"); + } + + public void onConnection(GXConnection con) + { + } + + public java.util.Date serverDateTime(GXConnection con) throws SQLException + { + ResultSet rslt = con.getStatement("_ServerDT_", "SELECT LOCALTIMESTAMP()", false).executeQuery(); + + rslt.next(); + Date value = rslt.getTimestamp(1); + rslt.close(); + + return value; + } + + public String serverVersion(GXConnection con) throws SQLException + { + return ""; + } + + public String connectionPhysicalId(GXConnection con) + { + try + { + + ResultSet rslt = con.getStatement("_ConnectionID_", "SELECT SESSID() AS S", false).executeQuery(); + + rslt.next(); + int value = rslt.getInt(1); + rslt.close(); + + return String.valueOf(value); + } + catch (SQLException e) + { + return ""; + } + } + + public boolean getSupportsAutocommit() + { + return true; + } + + public void commit(Connection con) throws SQLException + { + //Las reorgs corren en modo autocommit con lo cual no se debe hacer commit ni rollback implicitos. + if (!com.genexus.ApplicationContext.getInstance().getReorganization()) + { + con.commit(); + } + } + + public void rollback(Connection con) throws SQLException + { + //Las reorgs corren en modo autocommit con lo cual no se debe hacer commit ni rollback implicitos. + if (!com.genexus.ApplicationContext.getInstance().getReorganization()) + { + con.rollback(); + } + } + public boolean ignoreConnectionError(SQLException e) + { + return false; + } + + public boolean rePrepareStatement(SQLException e) + { + return false; + } + + public boolean getSupportsQueryTimeout() + { + return true; + + } + + public boolean useStreamsInNullLongVarchar() + { + return false; + } + + public boolean useStreamsInLongVarchar() + { + return true; + } + + private static java.lang.reflect.Method PUTBYTES; + + /** Setea los datos de un blob + * El parametro blob debe ser una instancia de java.sql.Blob o descendiente + * Esta puesto como Object para que compile sin problemas en JSharp + */ + public void setBlobData(Object blob, InputStream stream, int length)throws Exception + { + try + { + byte [] bytes = new byte[length]; + com.genexus.PrivateUtilities.readFully(stream, bytes, 0, length); + if(PUTBYTES == null) + { + PUTBYTES = Class.forName("java.sql.Blob").getMethod("setBytes", new Class[]{long.class, byte[].class}); + } + PUTBYTES.invoke(blob, new Object[]{new Long(1), bytes}); + }catch(Exception e) + { + System.err.println(e.toString()); + throw e; + } + } + + public int getId() + { + return DBMS_ORACLE; + } + public int getLockRetryCount(int lockRetryCount, int waitRecord){ + return lockRetryCount * waitRecord * 2; + } + + public boolean connectionClosed(SQLException e) + { + return (e.getErrorCode() == 17002); + } +} From 191a728410850138b249ba45f8098fab2b5bd704 Mon Sep 17 00:00:00 2001 From: iroqueta Date: Fri, 20 May 2022 10:52:49 -0300 Subject: [PATCH 2/4] Dameng DBMS first implementation Issue: 96184 --- .../com/genexus/db/driver/GXDBMSdameng.java | 173 +++++++----------- 1 file changed, 67 insertions(+), 106 deletions(-) diff --git a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java index 44a9db86f..4ba9b525d 100644 --- a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java +++ b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java @@ -6,46 +6,39 @@ import com.genexus.CommonUtil; -public class GXDBMSdameng implements GXDBMS -{ - public void setDatabaseName(String dbName) - { +public class GXDBMSdameng implements GXDBMS { + + public void setDatabaseName(String dbName) { } - public String getDatabaseName() - { + + public String getDatabaseName() { return ""; - } - public void setInReorg() - { } - public ResultSet executeQuery(PreparedStatement stmt, boolean hold) throws SQLException - { + + public void setInReorg() { + } + + public ResultSet executeQuery(PreparedStatement stmt, boolean hold) throws SQLException { return stmt.executeQuery(); } - public int executeUpdate(PreparedStatement stmt) throws SQLException - { + public int executeUpdate(PreparedStatement stmt) throws SQLException { return stmt.executeUpdate(); } - public boolean execute(PreparedStatement stmt) throws SQLException - { + public boolean execute(PreparedStatement stmt) throws SQLException { return stmt.execute(); } - public int[] executeBatch(Statement stmt) throws SQLException - { + public int[] executeBatch(Statement stmt) throws SQLException { return stmt.executeBatch(); } - public boolean isAlive(GXConnection con) - { - try - { + public boolean isAlive(GXConnection con) { + try { serverDateTime(con); } - catch (SQLException e) - { + catch (SQLException e) { return false; } @@ -53,79 +46,66 @@ public boolean isAlive(GXConnection con) } - public boolean DataTruncation(SQLException e) - { + public boolean DataTruncation(SQLException e) { return false; } + private DataSource dataSource; - public void setDataSource(DataSource dataSource) - { + + public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } - public boolean useReadOnlyConnections() - { + public boolean useReadOnlyConnections() { return true; } - public boolean EndOfFile(SQLException e) - { - return ( e.getErrorCode() == 1403 || - e.getErrorCode() == 100 - ); + public boolean EndOfFile(SQLException e) { + return (e.getErrorCode() == 1403 || e.getErrorCode() == 100); } - public boolean ReferentialIntegrity(SQLException e) - { + public boolean ReferentialIntegrity(SQLException e) { return (e.getErrorCode() == 2291); } - public boolean DuplicateKeyValue(SQLException e) - { + public boolean DuplicateKeyValue(SQLException e) { return (e.getErrorCode() == -6602); } - public boolean ObjectLocked(SQLException e) - { - return ( e.getErrorCode() == 54 - ); + + public boolean ObjectLocked(SQLException e) { + return ( e.getErrorCode() == 54); } - public boolean ObjectNotFound(SQLException e) - { + + public boolean ObjectNotFound(SQLException e) { return ( e.getErrorCode() == 942 || e.getErrorCode() == 950 || e.getErrorCode() == 1418 || e.getErrorCode() == 1432 || e.getErrorCode() == 2289 || e.getErrorCode() == 2443 || - e.getErrorCode() == 4080 - ); + e.getErrorCode() == 4080); } - public java.util.Date nullDate() - { + + public java.util.Date nullDate() { return CommonUtil.ymdhmsToT_noYL(1, 1, 1, 0, 0, 0); } - public boolean useDateTimeInDate() - { + public boolean useDateTimeInDate() { return false; } - public boolean useCharInDate() - { + + public boolean useCharInDate() { return false; } - - public void setConnectionProperties(java.util.Properties props) - { + public void setConnectionProperties(java.util.Properties props) { props.put("fixedString", "true"); } - public void onConnection(GXConnection con) - { + public void onConnection(GXConnection con) { } - public java.util.Date serverDateTime(GXConnection con) throws SQLException - { + public java.util.Date serverDateTime(GXConnection con) throws SQLException { ResultSet rslt = con.getStatement("_ServerDT_", "SELECT LOCALTIMESTAMP()", false).executeQuery(); rslt.next(); @@ -135,16 +115,12 @@ public java.util.Date serverDateTime(GXConnection con) throws SQLException return value; } - public String serverVersion(GXConnection con) throws SQLException - { + public String serverVersion(GXConnection con) throws SQLException { return ""; } - public String connectionPhysicalId(GXConnection con) - { - try - { - + public String connectionPhysicalId(GXConnection con) { + try { ResultSet rslt = con.getStatement("_ConnectionID_", "SELECT SESSID() AS S", false).executeQuery(); rslt.next(); @@ -153,57 +129,46 @@ public String connectionPhysicalId(GXConnection con) return String.valueOf(value); } - catch (SQLException e) - { + catch (SQLException e) { return ""; } } - public boolean getSupportsAutocommit() - { + public boolean getSupportsAutocommit() { return true; } - public void commit(Connection con) throws SQLException - { + public void commit(Connection con) throws SQLException { //Las reorgs corren en modo autocommit con lo cual no se debe hacer commit ni rollback implicitos. - if (!com.genexus.ApplicationContext.getInstance().getReorganization()) - { + if (!com.genexus.ApplicationContext.getInstance().getReorganization()) { con.commit(); } } - public void rollback(Connection con) throws SQLException - { + public void rollback(Connection con) throws SQLException { //Las reorgs corren en modo autocommit con lo cual no se debe hacer commit ni rollback implicitos. - if (!com.genexus.ApplicationContext.getInstance().getReorganization()) - { + if (!com.genexus.ApplicationContext.getInstance().getReorganization()) { con.rollback(); } } - public boolean ignoreConnectionError(SQLException e) - { + + public boolean ignoreConnectionError(SQLException e) { return false; } - - public boolean rePrepareStatement(SQLException e) - { + + public boolean rePrepareStatement(SQLException e) { return false; } - public boolean getSupportsQueryTimeout() - { + public boolean getSupportsQueryTimeout() { return true; - } - public boolean useStreamsInNullLongVarchar() - { + public boolean useStreamsInNullLongVarchar() { return false; } - public boolean useStreamsInLongVarchar() - { + public boolean useStreamsInLongVarchar() { return true; } @@ -213,34 +178,30 @@ public boolean useStreamsInLongVarchar() * El parametro blob debe ser una instancia de java.sql.Blob o descendiente * Esta puesto como Object para que compile sin problemas en JSharp */ - public void setBlobData(Object blob, InputStream stream, int length)throws Exception - { - try - { + public void setBlobData(Object blob, InputStream stream, int length)throws Exception { + try { byte [] bytes = new byte[length]; com.genexus.PrivateUtilities.readFully(stream, bytes, 0, length); - if(PUTBYTES == null) - { + if(PUTBYTES == null) { PUTBYTES = Class.forName("java.sql.Blob").getMethod("setBytes", new Class[]{long.class, byte[].class}); } PUTBYTES.invoke(blob, new Object[]{new Long(1), bytes}); - }catch(Exception e) - { - System.err.println(e.toString()); - throw e; + } + catch(Exception e) { + System.err.println(e.toString()); + throw e; } } - public int getId() - { + public int getId() { return DBMS_ORACLE; } - public int getLockRetryCount(int lockRetryCount, int waitRecord){ + + public int getLockRetryCount(int lockRetryCount, int waitRecord){ return lockRetryCount * waitRecord * 2; - } + } - public boolean connectionClosed(SQLException e) - { + public boolean connectionClosed(SQLException e) { return (e.getErrorCode() == 17002); } } From 8a8a1e210e406561d39db51e2d3471ef073deb51 Mon Sep 17 00:00:00 2001 From: iroqueta Date: Mon, 23 May 2022 09:43:23 -0300 Subject: [PATCH 3/4] Dameng DBMS first implementation Issue: 96184 --- .../java/com/genexus/db/driver/DataSource.java | 1 + .../genexus/db/driver/GXCallableStatement.java | 2 +- .../java/com/genexus/db/driver/GXDBMS.java | 1 + .../com/genexus/db/driver/GXDBMSdameng.java | 2 +- .../genexus/db/driver/GXPreparedStatement.java | 18 +++++++++--------- .../specific/java/BatchUpdateCursor.java | 3 ++- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/java/src/main/java/com/genexus/db/driver/DataSource.java b/java/src/main/java/com/genexus/db/driver/DataSource.java index 1ea9eecf9..d45f9ea86 100644 --- a/java/src/main/java/com/genexus/db/driver/DataSource.java +++ b/java/src/main/java/com/genexus/db/driver/DataSource.java @@ -589,6 +589,7 @@ public String[] concatOp() case GXDBMS.DBMS_DB2: return new String[]{"", " CONCAT ", ""}; case GXDBMS.DBMS_ORACLE: + case GXDBMS.DBMS_DAMENG: case GXDBMS.DBMS_HANA: case GXDBMS.DBMS_POSTGRESQL: case GXDBMS.DBMS_SQLITE: diff --git a/java/src/main/java/com/genexus/db/driver/GXCallableStatement.java b/java/src/main/java/com/genexus/db/driver/GXCallableStatement.java index d81aa9ad6..c580d639f 100644 --- a/java/src/main/java/com/genexus/db/driver/GXCallableStatement.java +++ b/java/src/main/java/com/genexus/db/driver/GXCallableStatement.java @@ -79,7 +79,7 @@ public void setNotInUse() public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException { - if (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE && sqlType == Types.BIT) + if ((con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG) && sqlType == Types.BIT) { sqlType = PLSQL_BOOLEAN; } diff --git a/java/src/main/java/com/genexus/db/driver/GXDBMS.java b/java/src/main/java/com/genexus/db/driver/GXDBMS.java index 30e910616..fdb097d7b 100644 --- a/java/src/main/java/com/genexus/db/driver/GXDBMS.java +++ b/java/src/main/java/com/genexus/db/driver/GXDBMS.java @@ -20,6 +20,7 @@ public interface GXDBMS public static final int DBMS_SQLITE = 9; public static final int DBMS_HANA = 10; public static final int DBMS_SERVICE = 11; + public static final int DBMS_DAMENG = 12; boolean DataTruncation(SQLException e); boolean useReadOnlyConnections(); diff --git a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java index 4ba9b525d..3534d1312 100644 --- a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java +++ b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java @@ -194,7 +194,7 @@ public void setBlobData(Object blob, InputStream stream, int length)throws Excep } public int getId() { - return DBMS_ORACLE; + return DBMS_DAMENG; } public int getLockRetryCount(int lockRetryCount, int waitRecord){ diff --git a/java/src/main/java/com/genexus/db/driver/GXPreparedStatement.java b/java/src/main/java/com/genexus/db/driver/GXPreparedStatement.java index bbec393d1..66acb332e 100644 --- a/java/src/main/java/com/genexus/db/driver/GXPreparedStatement.java +++ b/java/src/main/java/com/genexus/db/driver/GXPreparedStatement.java @@ -393,7 +393,7 @@ public void setBoolean(int index, boolean value) throws SQLException log(GXDBDebug.LOG_MAX, "setBoolean - index : " + index + " value : " + value); try { - if (this instanceof GXCallableStatement && !isUpdateBlobStmt && con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + if (this instanceof GXCallableStatement && !isUpdateBlobStmt && (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG)) { stmt.setObject(index, value, PLSQL_BOOLEAN); } @@ -410,7 +410,7 @@ public void setBoolean(int index, boolean value) throws SQLException } else { - if (this instanceof GXCallableStatement && !isUpdateBlobStmt && con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + if (this instanceof GXCallableStatement && !isUpdateBlobStmt && (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG)) { stmt.setObject(index, value, PLSQL_BOOLEAN); } @@ -615,12 +615,12 @@ public void setVarchar(int index, String value) throws SQLException public static boolean addSpaceToEmptyVarChar = true; public void setVarchar(int index, String value, int length) throws SQLException { - String realValue = (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) ? CommonUtil.rtrim(value) : value; + String realValue = (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG) ? CommonUtil.rtrim(value) : value; realValue = CommonUtil.left(realValue, length); if(realValue.equals("") && (addSpaceToEmptyVarChar||!fieldAcceptsNull) && - con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG)) { realValue = " "; } @@ -686,10 +686,10 @@ public void setLongVarchar(int index, String value) throws SQLException } private void setLongVarchar2(int index, String value, boolean nls) throws SQLException { - String realValue = (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) ? CommonUtil.rtrim(value) : value; + String realValue = (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG) ? CommonUtil.rtrim(value) : value; if(realValue.equals("") && (addSpaceToEmptyVarChar||!fieldAcceptsNull) && - con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG)) { realValue = " "; } @@ -894,7 +894,7 @@ public void setString(int index, String value, int length) throws SQLException } - if(value.equals("") && con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + if(value.equals("") && (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG)) { value = " "; } @@ -904,7 +904,7 @@ public void setString(int index, String value, int length) throws SQLException log(GXDBDebug.LOG_MAX, "setString - index : " + index + " value : " + value); try { - if (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + if (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG) { stmt.setObject(index, value); } @@ -921,7 +921,7 @@ public void setString(int index, String value, int length) throws SQLException } else { - if (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE) + if (con.getDBMS().getId() == GXDBMS.DBMS_ORACLE || con.getDBMS().getId() == GXDBMS.DBMS_DAMENG) { stmt.setObject(index, value); } diff --git a/java/src/main/java/com/genexus/specific/java/BatchUpdateCursor.java b/java/src/main/java/com/genexus/specific/java/BatchUpdateCursor.java index be7936a0e..655c1d9c8 100644 --- a/java/src/main/java/com/genexus/specific/java/BatchUpdateCursor.java +++ b/java/src/main/java/com/genexus/specific/java/BatchUpdateCursor.java @@ -11,7 +11,8 @@ public boolean supportsSavePoint(Object obj) { return ( ds.dbms.getId() == GXDBMS.DBMS_SQLSERVER || ds.dbms.getId() == GXDBMS.DBMS_AS400 || ds.dbms.getId() == GXDBMS.DBMS_DB2 || - ds.dbms.getId() == GXDBMS.DBMS_POSTGRESQL || + ds.dbms.getId() == GXDBMS.DBMS_POSTGRESQL || + ds.dbms.getId() == GXDBMS.DBMS_DAMENG || ds.dbms.getId() == GXDBMS.DBMS_ORACLE ); } From 080ce780c77c9ebd93c570c6ef2e1d1de2342639 Mon Sep 17 00:00:00 2001 From: iroqueta Date: Mon, 23 May 2022 18:04:23 -0300 Subject: [PATCH 4/4] Dameng DBMS first implementation Issue: 96184 --- common/src/main/java/com/genexus/db/BlobUpdateCursor.java | 2 +- java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/genexus/db/BlobUpdateCursor.java b/common/src/main/java/com/genexus/db/BlobUpdateCursor.java index fb17883db..7128e642c 100644 --- a/common/src/main/java/com/genexus/db/BlobUpdateCursor.java +++ b/common/src/main/java/com/genexus/db/BlobUpdateCursor.java @@ -82,7 +82,7 @@ void postExecuteInsert(AbstractDataStoreProviderBase connectionProvider, Abstrac IGXPreparedStatement selStmt = SentenceProvider.getPreparedStatement(connectionProvider, mCursorId + BLOB_SEL_ID, blobStmt2, false); // Seteo el argumento (el rowId) y ejecuto el select - String rowId = ((IGXCallableStatement)mPreparedStatement).getString(cantNoBlobParms + 1); + String rowId = ((IGXCallableStatement)mPreparedStatement).getString(cantNoBlobParms + 1).trim(); selStmt.setString(1, rowId); IGXResultSet resultSet = (IGXResultSet)selStmt.executeQuery(); resultSet.next(); diff --git a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java index 3534d1312..b48ea419b 100644 --- a/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java +++ b/java/src/main/java/com/genexus/db/driver/GXDBMSdameng.java @@ -65,7 +65,7 @@ public boolean EndOfFile(SQLException e) { } public boolean ReferentialIntegrity(SQLException e) { - return (e.getErrorCode() == 2291); + return (e.getErrorCode() == -6607); } public boolean DuplicateKeyValue(SQLException e) {