|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--litebase.PreparedStatement
Represents a SQL Statement that can be prepared (compiled) once and executed many times with different parameter values.
| Constructor Summary | |
protected |
PreparedStatement(LitebaseConnection driver)
Basic constructor |
| Method Summary | |
void |
clearParameters()
This method clears all of the input parameter that have been set on this statement. |
ResultSet |
executeQuery()
This method executes a prepared SQL query and returns its ResultSet. |
int |
executeUpdate()
This method executes an SQL INSERT, UPDATE or DELETE statement. |
protected void |
prepare(java.lang.String sql)
Prepare a SQL statement. |
void |
setDate(int index,
waba.util.Date date)
it formats the Date d in a string "YYYY/MM/DD" and calls the setString IMPORTANT: You must use care with the constructor new Date( |
void |
setDateTime(int index,
waba.util.Date date,
waba.sys.Time time)
It formats the Date d and the Time t in a string "YYYY/MM/DD HH:MM:SS:ZZZ" and calls the setString IMPORTANT: You must use care with the constructor new Date( |
void |
setDouble(int index,
double value)
This method sets the specified parameter from the given Java double value. |
void |
setInt(int index,
int value)
This method sets the specified parameter from the given Java int value. |
void |
setLong(int index,
long value)
This method sets the specified parameter from the given Java long value. |
void |
setString(int index,
java.lang.String value)
This method sets the specified parameter from the given Java String value. |
void |
setTime(int index,
waba.sys.Time time)
It formats the Time t in a string "YYYY/MM/DD HH:MM:SS:ZZZ" and calls the setString |
java.lang.String |
toString()
Returns the sql used in this statement. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
protected PreparedStatement(LitebaseConnection driver)
driver - the LitebaseConnection that will process the statement| Method Detail |
protected void prepare(java.lang.String sql)
throws SQLParseException
sql - the SQL expression
public ResultSet executeQuery()
throws DriverException
public int executeUpdate()
throws DriverException
public void setInt(int index,
int value)
throws DriverException
int value.index - The index of the parameter value to set, starting from 0.value - The value of the parameter.
public void setLong(int index,
long value)
throws DriverException
long value.index - The index of the parameter value to set, starting from 0.value - The value of the parameter.
public void setDouble(int index,
double value)
throws DriverException
double value.index - The index of the parameter value to set, starting from 0.value - The value of the parameter.
public void setString(int index,
java.lang.String value)
throws DriverException
String value.index - The index of the parameter value to set, starting from 0.value - The value of the parameter. DO NOT SURROUND IT WITH '!.
public void setDate(int index,
waba.util.Date date)
throws DriverException
public void setDateTime(int index,
waba.util.Date date,
waba.sys.Time time)
throws DriverException
public void setTime(int index,
waba.sys.Time time)
throws DriverException
public void clearParameters()
throws DriverException
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||