[ 1811965 ] Import of SQLStatement fails if line ends with ;
This commit is contained in:
parent
f5f50da2f4
commit
6c301fe4cf
|
@ -43,7 +43,10 @@ public class SQLStatementElementHandler extends AbstractElementHandler {
|
||||||
log.info(elementValue);
|
log.info(elementValue);
|
||||||
Attributes atts = element.attributes;
|
Attributes atts = element.attributes;
|
||||||
String DBType = atts.getValue("DBType");
|
String DBType = atts.getValue("DBType");
|
||||||
PreparedStatement pstmt = DB.prepareStatement(atts.getValue("statement"), getTrxName(ctx));
|
String sql = atts.getValue("statement").trim();
|
||||||
|
if (sql.endsWith(";"))
|
||||||
|
sql = sql.substring(0, sql.length() - 1);
|
||||||
|
PreparedStatement pstmt = DB.prepareStatement(sql, getTrxName(ctx));
|
||||||
try {
|
try {
|
||||||
if(DBType.equals("ALL")) {
|
if(DBType.equals("ALL")) {
|
||||||
int n = pstmt.executeUpdate();
|
int n = pstmt.executeUpdate();
|
||||||
|
|
Loading…
Reference in New Issue