/** * * Constructs a new tinySQLStatement object. * @param conn the tinySQLConnection object * */ public TinySQLPreparedStatement(TinySQLConnection conn, String inputString) { int nextQuestionMark, startAt; connection = conn; startAt = 0; statementString = inputString; while ((nextQuestionMark = statementString.indexOf("?", startAt)) > -1) { if (substitute == (java.util.Vector <Object>)null) { substitute = new java.util.Vector <Object>(); } substitute.addElement(""); startAt = nextQuestionMark + 1; } invalidIndex = " is not in the range 1 to " + java.lang.Integer.toString(substitute.size()); if (debug) { java.lang.SystemJ.outJ.println("Prepare statement has " + substitute.size() + " parameters."); } this.setPoolable(true); //Basties note: see Java documentation java.sql.SQLStatement.isPoolable }
/** * * Constructs a new tinySQLStatement object. * @param conn the tinySQLConnection object * */ public TinySQLStatement(TinySQLConnection conn) { connection = conn; if (debug) { java.lang.SystemJ.outJ.println("connection is " + connection.toString()); } }