diff -r ab794c23a556 src-core/src/org/openbravo/data/Sqlc.java
--- a/src-core/src/org/openbravo/data/Sqlc.java	Wed Jun 01 09:24:38 2016 +0200
+++ b/src-core/src/org/openbravo/data/Sqlc.java	Sun Jun 05 16:10:43 2016 +0200
@@ -736,10 +736,11 @@
       // Get the ResultSetMetaData. This will be used for
       // the column headings
       if (sql.executeType.equals("executeQuery")) {
-        result = preparedStatement.executeQuery();
-        if (log4j.isDebugEnabled())
-          log4j.debug("query done");
-        rsmd = result.getMetaData();
+        /*
+         * No need to really run the query. Both pg & ora allow to get ResultSetMetaData from a
+         * PreparedStatement already
+         */
+        rsmd = preparedStatement.getMetaData();
         // Get the number of columns in the result set
         numCols = rsmd.getColumnCount();
         if (log4j.isDebugEnabled())
