Overview Module Function Class Tea 3.2.5 Reference Documentation
© 2009 PDM&FC

Class TPreparedStatement

TPreparedStatement -> TStatement

Represents a SQL pre-compiled statement.

Method Summary
execute
         Executes an arbitrary SQL statement.
query
         Executes the SQL query represented by this prepared statement.
setDate index value
         Sets the value of one of the value placeholders as a date object.
setFloat index value
         Sets the value of one of the value placeholders.
setInt index value
         Sets the value of one of the value placeholders.
setString index value
         Sets the value of one of the value placeholders.
update
         Executes the SQL statement that modifies the contents of the database represented by this prepared statement.

Method Detail

execute

TPreparedStatement execute

Executes an arbitrary SQL statement.


query

TPreparedStatement query

Executes the SQL query represented by this prepared statement.

Returns:
An instance of TResultSet that represents the result of the execution of this prepared statement.


setDate

TPreparedStatement setDate index value

Sets the value of one of the value placeholders as a date object.

Parameters:
index - Integer representing the index of the placeholder to modify.
value - TDate object that will be assigned to the placeholder.
Returns:
A reference to the same object for which the method was called.

This method is used to set the date value of one of the placeholders. The index of the first placeholder in the SQL statement is taken to be one. If the value argument is null then a SQL NULL is used as the placeholder value.

Since: 3.1.5

setFloat

TPreparedStatement setFloat index value

Sets the value of one of the value placeholders.

Parameters:
index - Integer representing the index of the placeholder to modify.
value - Numeric object whose value will be used to initialize the placeholder.
Returns:
A reference to the same object for which the method was called.

This method is used to set the floating point value of one of the placeholders. The index of the first placeholder in the SQL statement is taken to be one. If the value argument is null then a SQL NULL is used as the placeholder value.

setInt

TPreparedStatement setInt index value

Sets the value of one of the value placeholders.

Parameters:
index - Integer representing the index of the placeholder to modify.
value - Numeric object whose value will be used to initialize the placeholder.
Returns:
A reference to the same object for which the method was called.

This method is used to set the integer value of one of the placeholders. The index of the first placeholder in the SQL statement is taken to be one. If the value argument is null then a SQL NULL is used as the placeholder value.

setString

TPreparedStatement setString index value

Sets the value of one of the value placeholders.

Parameters:
index - Integer representing the index of the placeholder to modify.
value - String object whose contents will be used to initialize the placeholder.
Returns:
A reference to the same object for which the method was called.

This method is used to set the string value of one of the placeholders. The index of the first placeholder in the SQL statement is taken to be one. If the value argument is null then a SQL NULL is used as the placeholder value.

update

TPreparedStatement update

Executes the SQL statement that modifies the contents of the database represented by this prepared statement.

Returns:
An integer object representing the number of records modified in the database.



Overview Module Function Class Tea 3.2.5 Reference Documentation
© 2009 PDM&FC
Report a bug or request new features
© 2009