diff --git a/src-core/src/org/openbravo/database/RDBMSIndependent.java b/src-core/src/org/openbravo/database/RDBMSIndependent.java
--- a/src-core/src/org/openbravo/database/RDBMSIndependent.java
+++ b/src-core/src/org/openbravo/database/RDBMSIndependent.java
@@ -30,7 +30,7 @@
     StringBuffer strSql = new StringBuffer();
     sql = sql.toUpperCase().replace("CALL ", "SELECT * FROM ");
     sql = sql.toUpperCase().replace("ALL TRIGGERS", "TRIGGER ALL");
-    if (totalOutParameters == 1) {
+    if (totalOutParameters > 0) {
       int init = sql.indexOf("(");
       if (init == -1)
         throw new ServletException("Badly formed sql: " + sql);
@@ -44,9 +44,7 @@
       while (stoken.hasMoreTokens()) {
         String token = stoken.nextToken();
         if (token.indexOf("?") != -1) {
-          if (!found && types.elementAt(count).equalsIgnoreCase("out")) {
-            found = true;
-          } else {
+          if (!types.elementAt(count).equalsIgnoreCase("out")) {
             strSql.append((!first ? "," : "")).append(token);
             first = false;
           }
