Skip to content

Commit 94d58a6

Browse files
committed
Enable dbms_output with unlimited size
1 parent 0d8501b commit 94d58a6

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/main/java/org/utplsql/api/DBHelper.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,29 +97,19 @@ public static boolean versionCompatibilityCheck(Connection conn)
9797
}
9898

9999
/**
100-
* Enables the dbms_output buffer.
100+
* Enable the dbms_output buffer with unlimited size.
101101
* @param conn the connection
102-
* @param bufferLen the buffer length
103102
*/
104-
public static void enableDBMSOutput(Connection conn, int bufferLen) {
105-
try (CallableStatement call = conn.prepareCall("BEGIN dbms_output.enable(?); END;")) {
106-
call.setInt(1, bufferLen);
103+
public static void enableDBMSOutput(Connection conn) {
104+
try (CallableStatement call = conn.prepareCall("BEGIN dbms_output.enable(NULL); END;")) {
107105
call.execute();
108106
} catch (SQLException e) {
109107
System.out.println("Failed to enable dbms_output.");
110108
}
111109
}
112110

113111
/**
114-
* Enables the dbms_output buffer.
115-
* @param conn the connection
116-
*/
117-
public static void enableDBMSOutput(Connection conn) {
118-
enableDBMSOutput(conn, Integer.MAX_VALUE);
119-
}
120-
121-
/**
122-
* Disables the dbms_output buffer.
112+
* Disable the dbms_output buffer.
123113
* @param conn the connection
124114
*/
125115
public static void disableDBMSOutput(Connection conn) {

0 commit comments

Comments
 (0)