details: https://code.openbravo.com/erp/devel/pi/rev/76bc4890f3db
changeset: 17751:76bc4890f3db
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Thu Aug 23 10:09:14 2012 +0200
summary: Fixed issue 21277. Now the method will not produce broken sql if
there are no parameteres.
diffstat:
src/org/openbravo/service/db/CallStoredProcedure.java | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (25 lines):
diff -r 04a9113ccbfc -r 76bc4890f3db
src/org/openbravo/service/db/CallStoredProcedure.java
--- a/src/org/openbravo/service/db/CallStoredProcedure.java Mon Aug 20
14:44:27 2012 +0200
+++ b/src/org/openbravo/service/db/CallStoredProcedure.java Thu Aug 23
10:09:14 2012 +0200
@@ -82,17 +82,15 @@
} else {
sb.append("SELECT " + name);
}
+ sb.append("(");
for (int i = 0; i < parameters.size(); i++) {
- if (i == 0) {
- sb.append("(");
- } else {
+ if (i != 0) {
sb.append(",");
}
sb.append("?");
}
- if (parameters.size() > 0) {
- sb.append(")");
- }
+ sb.append(")");
+
if (returnResults || !new
DalConnectionProvider(false).getRDBMS().equalsIgnoreCase("ORACLE")) {
sb.append(" AS RESULT FROM DUAL");
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits