Hitachi

Hitachi Advanced Database Application Development Guide


8.4.34 setTimestamp(int parameterIndex, Timestamp x, Calendar cal)

Organization of this subsection

(1) Function

This method converts a java.sql.Timestamp object specified in local time to the equivalent value in a specified calendar's time zone, and then sets the resulting value as a dynamic parameter value.

(2) Format

public synchronized void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException

(3) Arguments

int parameterIndex

Specifies the number of a dynamic parameter.

Timestamp x

Specifies the java.sql.Timestamp object that contains the value to be set in the specified dynamic parameter.

Calendar cal

Specifies the calendar in which has been set the time zone for the value to be stored in the database. If null is specified, the Java Virtual Machine's (JVM) default time zone's calendar is applied.

(4) Return value

None.

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: