[Ils-source] r1303 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Tue Mar 31 12:40:43 MST 2015
Author: scribe
Date: 2015-03-31 12:40:42 -0700 (Tue, 31 Mar 2015)
New Revision: 1303
Modified:
trunk/webapp/SQL.jsp
Log:
added some improvements to SQL.jsp merged from community/ repo
Modified: trunk/webapp/SQL.jsp
===================================================================
--- trunk/webapp/SQL.jsp 2015-03-02 18:55:09 UTC (rev 1302)
+++ trunk/webapp/SQL.jsp 2015-03-31 19:40:42 UTC (rev 1303)
@@ -192,9 +192,16 @@
if (sqlExecuteFile != null) {
FileReader fin = new FileReader(sqlPath+"/"+sqlExecuteFile);
BufferedReader bis = new BufferedReader(fin);
+ String execLine = "";
for (String line = bis.readLine(); line != null; line = bis.readLine()) {
- if (line.trim().length() > 1)
- runSQL(line, null, 0, 0, out);
+ line = line.trim();
+ if (line.length() > 1) {
+ execLine += line;
+ if (execLine.endsWith(";")) {
+ runSQL(execLine, null, 0, 0, out);
+ execLine = "";
+ }
+ }
}
bis.close();
fin.close();
@@ -724,6 +731,7 @@
errOut.println("</td> </tr>");
}
}
+ errOut.println("</table><br />");
}
if (rs != null) {
ResultSetMetaData meta = rs.getMetaData();
More information about the Ils-source
mailing list