Edit C:\apache-ant-1.8.0\docs\manual\api\org\apache\tools\ant\taskdefs\SQLExec.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_22) on Mon Feb 01 19:35:39 EST 2010 --> <TITLE> SQLExec (Apache Ant API) </TITLE> <META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.SQLExec class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="SQLExec (Apache Ant API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/taskdefs/Sleep.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.DelimiterType.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/taskdefs/SQLExec.html" target="_top"><B>FRAMES</B></A> <A HREF="SQLExec.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.tools.ant.taskdefs</FONT> <BR> Class SQLExec</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">org.apache.tools.ant.ProjectComponent</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">org.apache.tools.ant.Task</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html" title="class in org.apache.tools.ant.taskdefs">org.apache.tools.ant.taskdefs.JDBCTask</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.taskdefs.SQLExec</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable</DD> </DL> <HR> <DL> <DT><PRE>public class <B>SQLExec</B><DT>extends <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html" title="class in org.apache.tools.ant.taskdefs">JDBCTask</A></DL> </PRE> <P> Executes a series of SQL statements on a database using JDBC. <p>Statements can either be read in from a text file using the <i>src</i> attribute or from between the enclosing SQL tags.</p> <p>Multiple statements can be provided, separated by semicolons (or the defined <i>delimiter</i>). Individual lines within the statements can be commented using either --, // or REM at the start of the line.</p> <p>The <i>autocommit</i> attribute specifies whether auto-commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and committed. If it is turned off the statements will all be executed as one transaction.</p> <p>The <i>onerror</i> attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: <b>continue</b> execution, only show the error; <b>stop</b> execution and commit transaction; and <b>abort</b> execution and transaction and fail task.</p> <P> <P> <DL> <DT><B>Since:</B></DT> <DD>Ant 1.2</DD> </DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.DelimiterType.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.DelimiterType</A></B></CODE> <BR> delimiters we support, "normal" and "row"</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.OnError.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.OnError</A></B></CODE> <BR> The action a task should perform on an error, one of "continue", "stop" and "abort"</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.Transaction.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.Transaction</A></B></CODE> <BR> Contains the definition of a new transaction element.</TD> </TR> </TABLE> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#target">target</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#taskName">taskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#taskType">taskType</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#wrapper">wrapper</A></CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#description">description</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#location">location</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#project">project</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#SQLExec()">SQLExec</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#add(org.apache.tools.ant.types.ResourceCollection)">add</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> rc)</CODE> <BR> Adds a collection of resources (nested element).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#addFileset(org.apache.tools.ant.types.FileSet)">addFileset</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/FileSet.html" title="class in org.apache.tools.ant.types">FileSet</A> set)</CODE> <BR> Adds a set of files (nested fileset attribute).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#addText(java.lang.String)">addText</A></B>(java.lang.String sql)</CODE> <BR> Set an inline SQL command to execute.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.Transaction.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.Transaction</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#createTransaction()">createTransaction</A></B>()</CODE> <BR> Add a SQL transaction to execute</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#execSQL(java.lang.String, java.io.PrintStream)">execSQL</A></B>(java.lang.String sql, java.io.PrintStream out)</CODE> <BR> Exec the sql statement.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#execute()">execute</A></B>()</CODE> <BR> Load the sql file and then execute it</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected java.sql.Connection</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#getConnection()">getConnection</A></B>()</CODE> <BR> Caches the connection returned by the base class's getConnection method.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#getExpandProperties()">getExpandProperties</A></B>()</CODE> <BR> is property expansion inside inline text enabled?</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected java.sql.Statement</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#getStatement()">getStatement</A></B>()</CODE> <BR> Creates and configures a Statement instance which is then cached for subsequent calls.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#lastDelimiterPosition(java.lang.StringBuffer, java.lang.String)">lastDelimiterPosition</A></B>(java.lang.StringBuffer buf, java.lang.String currentLine)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#printResults(java.io.PrintStream)">printResults</A></B>(java.io.PrintStream out)</CODE> <BR> <B>Deprecated.</B> <I>since 1.6.x. Use <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#printResults(java.sql.ResultSet, java.io.PrintStream)"><CODE>the two arg version</CODE></A> instead.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#printResults(java.sql.ResultSet, java.io.PrintStream)">printResults</A></B>(java.sql.ResultSet rs, java.io.PrintStream out)</CODE> <BR> print any results in the result set.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#runStatements(java.io.Reader, java.io.PrintStream)">runStatements</A></B>(java.io.Reader reader, java.io.PrintStream out)</CODE> <BR> read in lines and execute them</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setAppend(boolean)">setAppend</A></B>(boolean append)</CODE> <BR> whether output should be appended to or overwrite an existing file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setCsvColumnSeparator(java.lang.String)">setCsvColumnSeparator</A></B>(java.lang.String s)</CODE> <BR> The column separator used when printing the results.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setCsvQuoteCharacter(java.lang.String)">setCsvQuoteCharacter</A></B>(java.lang.String s)</CODE> <BR> The character used to quote column values.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setDelimiter(java.lang.String)">setDelimiter</A></B>(java.lang.String delimiter)</CODE> <BR> Set the delimiter that separates SQL statements.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setDelimiterType(org.apache.tools.ant.taskdefs.SQLExec.DelimiterType)">setDelimiterType</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.DelimiterType.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.DelimiterType</A> delimiterType)</CODE> <BR> Set the delimiter type: "normal" or "row" (default "normal").</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setEncoding(java.lang.String)">setEncoding</A></B>(java.lang.String encoding)</CODE> <BR> Set the file encoding to use on the SQL files read in</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setErrorProperty()">setErrorProperty</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setErrorProperty(java.lang.String)">setErrorProperty</A></B>(java.lang.String errorProperty)</CODE> <BR> Property to set to "true" if a statement throws an error.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setEscapeProcessing(boolean)">setEscapeProcessing</A></B>(boolean enable)</CODE> <BR> Set escape processing for statements.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setExpandProperties(boolean)">setExpandProperties</A></B>(boolean expandProperties)</CODE> <BR> Enable property expansion inside nested text</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setKeepformat(boolean)">setKeepformat</A></B>(boolean keepformat)</CODE> <BR> whether or not format should be preserved.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setOnerror(org.apache.tools.ant.taskdefs.SQLExec.OnError)">setOnerror</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.OnError.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.OnError</A> action)</CODE> <BR> Action to perform when statement fails: continue, stop, or abort optional; default "abort"</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setOutput(java.io.File)">setOutput</A></B>(java.io.File output)</CODE> <BR> Set the output file; optional, defaults to the Ant log.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setOutput(org.apache.tools.ant.types.Resource)">setOutput</A></B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> output)</CODE> <BR> Set the output Resource; optional, defaults to the Ant log.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setPrint(boolean)">setPrint</A></B>(boolean print)</CODE> <BR> Print result sets from the statements; optional, default false</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setRawBlobs(boolean)">setRawBlobs</A></B>(boolean rawBlobs)</CODE> <BR> Set whether to print raw BLOBs rather than their string (hex) representations.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setRowCountProperty(int)">setRowCountProperty</A></B>(int rowCount)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setRowCountProperty(java.lang.String)">setRowCountProperty</A></B>(java.lang.String rowCountProperty)</CODE> <BR> Sets a given property to the number of rows in the first statement that returned a row count.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setShowheaders(boolean)">setShowheaders</A></B>(boolean showheaders)</CODE> <BR> Print headers for result sets from the statements; optional, default true.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setShowtrailers(boolean)">setShowtrailers</A></B>(boolean showtrailers)</CODE> <BR> Print trailing info (rows affected) for the SQL Addresses Bug/Request #27446</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setShowWarnings(boolean)">setShowWarnings</A></B>(boolean b)</CODE> <BR> whether to show SQLWarnings as WARN messages.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setSrc(java.io.File)">setSrc</A></B>(java.io.File srcFile)</CODE> <BR> Set the name of the SQL file to be run.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setStrictDelimiterMatching(boolean)">setStrictDelimiterMatching</A></B>(boolean b)</CODE> <BR> If false, delimiters will be searched for in a case-insesitive manner (i.e.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setTreatWarningsAsErrors(boolean)">setTreatWarningsAsErrors</A></B>(boolean b)</CODE> <BR> Whether a warning is an error - in which case onError aplies.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setWarningProperty()">setWarningProperty</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#setWarningProperty(java.lang.String)">setWarningProperty</A></B>(java.lang.String warningProperty)</CODE> <BR> Property to set to "true" if a statement produces a warning.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.taskdefs.JDBCTask"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.taskdefs.<A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html" title="class in org.apache.tools.ant.taskdefs">JDBCTask</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#addConnectionProperty(org.apache.tools.ant.taskdefs.Property)">addConnectionProperty</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#createClasspath()">createClasspath</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getClasspath()">getClasspath</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getLoader()">getLoader</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getLoaderMap()">getLoaderMap</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getPassword()">getPassword</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getRdbms()">getRdbms</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getUrl()">getUrl</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getUserId()">getUserId</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getVersion()">getVersion</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#isAutocommit()">isAutocommit</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#isCaching(boolean)">isCaching</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#isValidRdbms(java.sql.Connection)">isValidRdbms</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setAutocommit(boolean)">setAutocommit</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setCaching(boolean)">setCaching</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setClasspath(org.apache.tools.ant.types.Path)">setClasspath</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setClasspathRef(org.apache.tools.ant.types.Reference)">setClasspathRef</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setDriver(java.lang.String)">setDriver</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setFailOnConnectionError(boolean)">setFailOnConnectionError</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setPassword(java.lang.String)">setPassword</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setRdbms(java.lang.String)">setRdbms</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setUrl(java.lang.String)">setUrl</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setUserid(java.lang.String)">setUserid</A>, <A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#setVersion(java.lang.String)">setVersion</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#bindToOwner(org.apache.tools.ant.Task)">bindToOwner</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getOwningTarget()">getOwningTarget</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getRuntimeConfigurableWrapper()">getRuntimeConfigurableWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getTaskName()">getTaskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getTaskType()">getTaskType</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getWrapper()">getWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleErrorFlush(java.lang.String)">handleErrorFlush</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleErrorOutput(java.lang.String)">handleErrorOutput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleFlush(java.lang.String)">handleFlush</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)">handleInput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleOutput(java.lang.String)">handleOutput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#init()">init</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#isInvalid()">isInvalid</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, java.lang.Throwable, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.Throwable, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#maybeConfigure()">maybeConfigure</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#perform()">perform</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#reconfigure()">reconfigure</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setOwningTarget(org.apache.tools.ant.Target)">setOwningTarget</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable)">setRuntimeConfigurableWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setTaskName(java.lang.String)">setTaskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setTaskType(java.lang.String)">setTaskType</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#clone()">clone</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getDescription()">getDescription</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getLocation()">getLocation</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getProject()">getProject</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setLocation(org.apache.tools.ant.Location)">setLocation</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setProject(org.apache.tools.ant.Project)">setProject</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="SQLExec()"><!-- --></A><H3> SQLExec</H3> <PRE> public <B>SQLExec</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="setSrc(java.io.File)"><!-- --></A><H3> setSrc</H3> <PRE> public void <B>setSrc</B>(java.io.File srcFile)</PRE> <DL> <DD>Set the name of the SQL file to be run. Required unless statements are enclosed in the build file <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>srcFile</CODE> - the file containing the SQL command.</DL> </DD> </DL> <HR> <A NAME="setExpandProperties(boolean)"><!-- --></A><H3> setExpandProperties</H3> <PRE> public void <B>setExpandProperties</B>(boolean expandProperties)</PRE> <DL> <DD>Enable property expansion inside nested text <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>expandProperties</CODE> - if true expand properties.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="getExpandProperties()"><!-- --></A><H3> getExpandProperties</H3> <PRE> public boolean <B>getExpandProperties</B>()</PRE> <DL> <DD>is property expansion inside inline text enabled? <P> <DD><DL> <DT><B>Returns:</B><DD>true if properties are to be expanded.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="addText(java.lang.String)"><!-- --></A><H3> addText</H3> <PRE> public void <B>addText</B>(java.lang.String sql)</PRE> <DL> <DD>Set an inline SQL command to execute. NB: Properties are not expanded in this text unless <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#expandProperties"><CODE>expandProperties</CODE></A> is set. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>sql</CODE> - an inline string containing the SQL command.</DL> </DD> </DL> <HR> <A NAME="addFileset(org.apache.tools.ant.types.FileSet)"><!-- --></A><H3> addFileset</H3> <PRE> public void <B>addFileset</B>(<A HREF="../../../../../org/apache/tools/ant/types/FileSet.html" title="class in org.apache.tools.ant.types">FileSet</A> set)</PRE> <DL> <DD>Adds a set of files (nested fileset attribute). <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>set</CODE> - a set of files contains SQL commands, each File is run in a separate transaction.</DL> </DD> </DL> <HR> <A NAME="add(org.apache.tools.ant.types.ResourceCollection)"><!-- --></A><H3> add</H3> <PRE> public void <B>add</B>(<A HREF="../../../../../org/apache/tools/ant/types/ResourceCollection.html" title="interface in org.apache.tools.ant.types">ResourceCollection</A> rc)</PRE> <DL> <DD>Adds a collection of resources (nested element). <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>rc</CODE> - a collection of resources containing SQL commands, each resource is run in a separate transaction.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="createTransaction()"><!-- --></A><H3> createTransaction</H3> <PRE> public <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.Transaction.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.Transaction</A> <B>createTransaction</B>()</PRE> <DL> <DD>Add a SQL transaction to execute <P> <DD><DL> <DT><B>Returns:</B><DD>a Transaction to be configured.</DL> </DD> </DL> <HR> <A NAME="setEncoding(java.lang.String)"><!-- --></A><H3> setEncoding</H3> <PRE> public void <B>setEncoding</B>(java.lang.String encoding)</PRE> <DL> <DD>Set the file encoding to use on the SQL files read in <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>encoding</CODE> - the encoding to use on the files</DL> </DD> </DL> <HR> <A NAME="setDelimiter(java.lang.String)"><!-- --></A><H3> setDelimiter</H3> <PRE> public void <B>setDelimiter</B>(java.lang.String delimiter)</PRE> <DL> <DD>Set the delimiter that separates SQL statements. Defaults to ";"; optional <p>For example, set this to "go" and delimitertype to "ROW" for Sybase ASE or MS SQL Server.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>delimiter</CODE> - the separator.</DL> </DD> </DL> <HR> <A NAME="setDelimiterType(org.apache.tools.ant.taskdefs.SQLExec.DelimiterType)"><!-- --></A><H3> setDelimiterType</H3> <PRE> public void <B>setDelimiterType</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.DelimiterType.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.DelimiterType</A> delimiterType)</PRE> <DL> <DD>Set the delimiter type: "normal" or "row" (default "normal"). <p>The delimiter type takes two values - normal and row. Normal means that any occurrence of the delimiter terminate the SQL command whereas with row, only a line containing just the delimiter is recognized as the end of the command.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>delimiterType</CODE> - the type of delimiter - "normal" or "row".</DL> </DD> </DL> <HR> <A NAME="setPrint(boolean)"><!-- --></A><H3> setPrint</H3> <PRE> public void <B>setPrint</B>(boolean print)</PRE> <DL> <DD>Print result sets from the statements; optional, default false <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>print</CODE> - if true print result sets.</DL> </DD> </DL> <HR> <A NAME="setShowheaders(boolean)"><!-- --></A><H3> setShowheaders</H3> <PRE> public void <B>setShowheaders</B>(boolean showheaders)</PRE> <DL> <DD>Print headers for result sets from the statements; optional, default true. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>showheaders</CODE> - if true print headers of result sets.</DL> </DD> </DL> <HR> <A NAME="setShowtrailers(boolean)"><!-- --></A><H3> setShowtrailers</H3> <PRE> public void <B>setShowtrailers</B>(boolean showtrailers)</PRE> <DL> <DD>Print trailing info (rows affected) for the SQL Addresses Bug/Request #27446 <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>showtrailers</CODE> - if true prints the SQL rows affected<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="setOutput(java.io.File)"><!-- --></A><H3> setOutput</H3> <PRE> public void <B>setOutput</B>(java.io.File output)</PRE> <DL> <DD>Set the output file; optional, defaults to the Ant log. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>output</CODE> - the output file to use for logging messages.</DL> </DD> </DL> <HR> <A NAME="setOutput(org.apache.tools.ant.types.Resource)"><!-- --></A><H3> setOutput</H3> <PRE> public void <B>setOutput</B>(<A HREF="../../../../../org/apache/tools/ant/types/Resource.html" title="class in org.apache.tools.ant.types">Resource</A> output)</PRE> <DL> <DD>Set the output Resource; optional, defaults to the Ant log. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>output</CODE> - the output Resource to store results.<DT><B>Since:</B></DT> <DD>Ant 1.8</DD> </DL> </DD> </DL> <HR> <A NAME="setAppend(boolean)"><!-- --></A><H3> setAppend</H3> <PRE> public void <B>setAppend</B>(boolean append)</PRE> <DL> <DD>whether output should be appended to or overwrite an existing file. Defaults to false. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>append</CODE> - if true append to an existing file.<DT><B>Since:</B></DT> <DD>Ant 1.5</DD> </DL> </DD> </DL> <HR> <A NAME="setOnerror(org.apache.tools.ant.taskdefs.SQLExec.OnError)"><!-- --></A><H3> setOnerror</H3> <PRE> public void <B>setOnerror</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.OnError.html" title="class in org.apache.tools.ant.taskdefs">SQLExec.OnError</A> action)</PRE> <DL> <DD>Action to perform when statement fails: continue, stop, or abort optional; default "abort" <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>action</CODE> - the action to perform on statement failure.</DL> </DD> </DL> <HR> <A NAME="setKeepformat(boolean)"><!-- --></A><H3> setKeepformat</H3> <PRE> public void <B>setKeepformat</B>(boolean keepformat)</PRE> <DL> <DD>whether or not format should be preserved. Defaults to false. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>keepformat</CODE> - The keepformat to set</DL> </DD> </DL> <HR> <A NAME="setEscapeProcessing(boolean)"><!-- --></A><H3> setEscapeProcessing</H3> <PRE> public void <B>setEscapeProcessing</B>(boolean enable)</PRE> <DL> <DD>Set escape processing for statements. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>enable</CODE> - if true enable escape processing, default is true.<DT><B>Since:</B></DT> <DD>Ant 1.6</DD> </DL> </DD> </DL> <HR> <A NAME="setRawBlobs(boolean)"><!-- --></A><H3> setRawBlobs</H3> <PRE> public void <B>setRawBlobs</B>(boolean rawBlobs)</PRE> <DL> <DD>Set whether to print raw BLOBs rather than their string (hex) representations. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>rawBlobs</CODE> - whether to print raw BLOBs.<DT><B>Since:</B></DT> <DD>Ant 1.7.1</DD> </DL> </DD> </DL> <HR> <A NAME="setStrictDelimiterMatching(boolean)"><!-- --></A><H3> setStrictDelimiterMatching</H3> <PRE> public void <B>setStrictDelimiterMatching</B>(boolean b)</PRE> <DL> <DD>If false, delimiters will be searched for in a case-insesitive manner (i.e. delimer="go" matches "GO") and surrounding whitespace will be ignored (delimter="go" matches "GO "). <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setShowWarnings(boolean)"><!-- --></A><H3> setShowWarnings</H3> <PRE> public void <B>setShowWarnings</B>(boolean b)</PRE> <DL> <DD>whether to show SQLWarnings as WARN messages. <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setTreatWarningsAsErrors(boolean)"><!-- --></A><H3> setTreatWarningsAsErrors</H3> <PRE> public void <B>setTreatWarningsAsErrors</B>(boolean b)</PRE> <DL> <DD>Whether a warning is an error - in which case onError aplies. <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setCsvColumnSeparator(java.lang.String)"><!-- --></A><H3> setCsvColumnSeparator</H3> <PRE> public void <B>setCsvColumnSeparator</B>(java.lang.String s)</PRE> <DL> <DD>The column separator used when printing the results. <p>Defaults to ","</p> <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setCsvQuoteCharacter(java.lang.String)"><!-- --></A><H3> setCsvQuoteCharacter</H3> <PRE> public void <B>setCsvQuoteCharacter</B>(java.lang.String s)</PRE> <DL> <DD>The character used to quote column values. <p>If set, columns that contain either the column separator or the quote character itself will be surrounded by the quote character. The quote character itself will be doubled if it appears inside of the column's value.</p> <p>If this value is not set (the default), no column values will be quoted, not even if they contain the column separator.</p> <p><b>Note:<b> BLOB values will never be quoted.</p> <p>Defaults to "not set"</p> <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setErrorProperty(java.lang.String)"><!-- --></A><H3> setErrorProperty</H3> <PRE> public void <B>setErrorProperty</B>(java.lang.String errorProperty)</PRE> <DL> <DD>Property to set to "true" if a statement throws an error. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>errorProperty</CODE> - the name of the property to set in the event of an error.<DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setWarningProperty(java.lang.String)"><!-- --></A><H3> setWarningProperty</H3> <PRE> public void <B>setWarningProperty</B>(java.lang.String warningProperty)</PRE> <DL> <DD>Property to set to "true" if a statement produces a warning. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>warningProperty</CODE> - the name of the property to set in the event of a warning.<DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="setRowCountProperty(java.lang.String)"><!-- --></A><H3> setRowCountProperty</H3> <PRE> public void <B>setRowCountProperty</B>(java.lang.String rowCountProperty)</PRE> <DL> <DD>Sets a given property to the number of rows in the first statement that returned a row count. <P> <DD><DL> <DT><B>Since:</B></DT> <DD>Ant 1.8.0</DD> </DL> </DD> </DL> <HR> <A NAME="execute()"><!-- --></A><H3> execute</H3> <PRE> public void <B>execute</B>() throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE> <DL> <DD>Load the sql file and then execute it <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#execute()">execute</A></CODE> in class <CODE><A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.</DL> </DD> </DL> <HR> <A NAME="runStatements(java.io.Reader, java.io.PrintStream)"><!-- --></A><H3> runStatements</H3> <PRE> protected void <B>runStatements</B>(java.io.Reader reader, java.io.PrintStream out) throws java.sql.SQLException, java.io.IOException</PRE> <DL> <DD>read in lines and execute them <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader contains sql lines.<DD><CODE>out</CODE> - the place to output results. <DT><B>Throws:</B> <DD><CODE>java.sql.SQLException</CODE> - on sql problems <DD><CODE>java.io.IOException</CODE> - on io problems</DL> </DD> </DL> <HR> <A NAME="execSQL(java.lang.String, java.io.PrintStream)"><!-- --></A><H3> execSQL</H3> <PRE> protected void <B>execSQL</B>(java.lang.String sql, java.io.PrintStream out) throws java.sql.SQLException</PRE> <DL> <DD>Exec the sql statement. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>sql</CODE> - the SQL statement to execute<DD><CODE>out</CODE> - the place to put output <DT><B>Throws:</B> <DD><CODE>java.sql.SQLException</CODE> - on SQL problems</DL> </DD> </DL> <HR> <A NAME="printResults(java.io.PrintStream)"><!-- --></A><H3> printResults</H3> <PRE> protected void <B>printResults</B>(java.io.PrintStream out) throws java.sql.SQLException</PRE> <DL> <DD><B>Deprecated.</B> <I>since 1.6.x. Use <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.html#printResults(java.sql.ResultSet, java.io.PrintStream)"><CODE>the two arg version</CODE></A> instead.</I> <P> <DD>print any results in the statement <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>out</CODE> - the place to print results <DT><B>Throws:</B> <DD><CODE>java.sql.SQLException</CODE> - on SQL problems.</DL> </DD> </DL> <HR> <A NAME="printResults(java.sql.ResultSet, java.io.PrintStream)"><!-- --></A><H3> printResults</H3> <PRE> protected void <B>printResults</B>(java.sql.ResultSet rs, java.io.PrintStream out) throws java.sql.SQLException</PRE> <DL> <DD>print any results in the result set. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>rs</CODE> - the resultset to print information about<DD><CODE>out</CODE> - the place to print results <DT><B>Throws:</B> <DD><CODE>java.sql.SQLException</CODE> - on SQL problems.<DT><B>Since:</B></DT> <DD>Ant 1.6.3</DD> </DL> </DD> </DL> <HR> <A NAME="getConnection()"><!-- --></A><H3> getConnection</H3> <PRE> protected java.sql.Connection <B>getConnection</B>()</PRE> <DL> <DD>Caches the connection returned by the base class's getConnection method. <p>Subclasses that need to provide a different connection than the base class would, should override this method but keep in mind that this class expects to get the same connection instance on consecutive calls.</p> <p>returns null if the connection does not connect to the expected RDBMS.</p> <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html#getConnection()">getConnection</A></CODE> in class <CODE><A HREF="../../../../../org/apache/tools/ant/taskdefs/JDBCTask.html" title="class in org.apache.tools.ant.taskdefs">JDBCTask</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>Connection the newly created connection or null if the connection failed and failOnConnectionError is false.</DL> </DD> </DL> <HR> <A NAME="getStatement()"><!-- --></A><H3> getStatement</H3> <PRE> protected java.sql.Statement <B>getStatement</B>() throws java.sql.SQLException</PRE> <DL> <DD>Creates and configures a Statement instance which is then cached for subsequent calls. <p>Subclasses that want to provide different Statement instances, should override this method but keep in mind that this class expects to get the same connection instance on consecutive calls.</p> <P> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.sql.SQLException</CODE></DL> </DD> </DL> <HR> <A NAME="lastDelimiterPosition(java.lang.StringBuffer, java.lang.String)"><!-- --></A><H3> lastDelimiterPosition</H3> <PRE> public int <B>lastDelimiterPosition</B>(java.lang.StringBuffer buf, java.lang.String currentLine)</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setErrorProperty()"><!-- --></A><H3> setErrorProperty</H3> <PRE> protected final void <B>setErrorProperty</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setWarningProperty()"><!-- --></A><H3> setWarningProperty</H3> <PRE> protected final void <B>setWarningProperty</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setRowCountProperty(int)"><!-- --></A><H3> setRowCountProperty</H3> <PRE> protected final void <B>setRowCountProperty</B>(int rowCount)</PRE> <DL> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/taskdefs/Sleep.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/taskdefs/SQLExec.DelimiterType.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/taskdefs/SQLExec.html" target="_top"><B>FRAMES</B></A> <A HREF="SQLExec.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de