|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sas.net.sharenet.ShareNetStatement | +--com.sas.net.sharenet.ShareNetPreparedStatement
This is the SAS/SHARE Driver for JDBC implementation for java.sql.PreparedStatement.
Fields inherited from interface java.sql.Statement |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
Constructor Summary |
Method Summary | |
void |
addBatch()
JDBC 2.0 Adds a set of parameters to the batch. |
void |
clearParameters()
Clears all the parameters. |
boolean |
execute()
Executes a query. |
ResultSet |
executeQuery()
Executes a prepared SQL query and returns the ResultSet. |
int |
executeUpdate()
Executes an SQL INSERT, UPDATE or DELETE statement. |
ResultSetMetaData |
getMetaData()
JDBC 2.0 Gets the number, types and properties of a ResultSet's columns as a ResultSetMetaData object. |
ParameterMetaData |
getParameterMetaData()
Retrieves the number, types and properties of this PreparedStatement object's parameters.
|
ResultSetMetaData |
getResultSetMetaData()
Deprecated. |
void |
setArray(int parameterIndex,
Array x)
JDBC 2.0 Sets a parameter to an Array object. |
void |
setAsciiStream(int parameterIndex,
InputStream x,
int length)
Sets a parameter to a Java java.io.InputStream. |
void |
setBigDecimal(int parameterIndex,
BigDecimal x)
Sets a parameter to a Java BigDecimal value. |
void |
setBinaryStream(int parameterIndex,
InputStream x,
int length)
Sets a parameter to a Java java.io.InputStream. |
void |
setBlob(int parameterIndex,
Blob x)
JDBC 2.0 Sets a parameter to a BLOB object. |
void |
setBoolean(int parameterIndex,
boolean x)
Sets a parameter to a Java Boolean value. |
void |
setByte(int parameterIndex,
byte x)
Sets a parameter to a Java byte value. |
void |
setBytes(int parameterIndex,
byte[] x)
Sets a parameter to a Java byte array value. |
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length)
JDBC 2.0 Sets a parameter to java.io.Reader object. |
void |
setClob(int parameterIndex,
Clob x)
JDBC 2.0 Sets a parameter to a CLOB object. |
void |
setDate(int parameterIndex,
Date x)
Sets a parameter to a Java java.sql.Date value. |
void |
setDate(int parameterIndex,
Date x,
Calendar cal)
JDBC 2.0 Sets a parameter to a java.sql.Date value. |
void |
setDouble(int parameterIndex,
double x)
Sets a parameter to a Java double value. |
void |
setFloat(int parameterIndex,
float x)
Sets a parameter to a Java float value. |
void |
setInt(int parameterIndex,
int x)
Sets a parameter to a Java int value. |
void |
setLong(int parameterIndex,
long x)
Sets a parameter to a Java long value. |
void |
setNull(int parameterIndex,
int sqlType)
Sets a parameter to SQL NULL. |
void |
setNull(int parameterIndex,
int sqlType,
String x)
JDBC 2.0 Sets a parameter to SQL NULL. |
void |
setObject(int parameterIndex,
Object x)
Sets a parameter to the default type. |
void |
setObject(int parameterIndex,
Object x,
int sqlType)
Sets a parameter to the input type. |
void |
setObject(int parameterIndex,
Object x,
int sqlType,
int scale)
Sets a parameter to the input type. |
void |
setRef(int parameterIndex,
Ref x)
JDBC 2.0 Sets a parameter to a REF(<structured-type>) object. |
void |
setShort(int parameterIndex,
short x)
Sets a parameter to a Java short value. |
void |
setString(int parameterIndex,
String x)
Sets a parameter to a Java string value. |
void |
setTime(int parameterIndex,
Time x)
Sets a parameter to a Java java.sql.Time value. |
void |
setTime(int parameterIndex,
Time x,
Calendar cal)
JDBC 2.0 Sets a parameter to a java.sql.Time value. |
void |
setTimestamp(int parameterIndex,
Timestamp x)
Sets a parameter to a Java java.sql.Timestamp value. |
void |
setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
JDBC 2.0 Sets a parameter to a java.sql.Timestamp value. |
void |
setUnicodeStream(int parameterIndex,
InputStream x,
int length)
Deprecated. |
void |
setURL(int parameterIndex,
URL x)
Sets the designated parameter to the given java.net.URL value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Statement |
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, exe
cute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, <
A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/sql/Statement.html#getFetchSize()">getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcu
rrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
Constructor Detail |
Method Detail |
public ResultSet executeQuery() throws SQLException
executeQuery
in interface PreparedStatement
SQLException
- This exception is thrown if a ShareNetException is detected.public int executeUpdate() throws SQLException
executeUpdate
in interface PreparedStatement
SQLException
- This exception is thrown if a ShareNetException is detected.public void setNull(int parameterIndex, int sqlType) throws SQLException
setNull
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.sqlType
- An SQL type code that is defined by java.sql.Types.SQLException
- This exception is thrown if a ShareNetException is detected or if
the sqlType is not FLOAT, DOUBLE, INTEGER, TIME, DATE or TIMESTAMP.
SAS software does not allow other types to be NULL.public void setBoolean(int parameterIndex, boolean x) throws SQLException
setBoolean
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support the SQL type BIT.public void setByte(int parameterIndex, byte x) throws SQLException
setByte
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type TINYINT.public void setShort(int parameterIndex, short x) throws SQLException
setShort
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type SMALLINT.public void setInt(int parameterIndex, int x) throws SQLException
setInt
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- An int value.SQLException
- This exception is thrown if parameterIndex is not valid.public void setLong(int parameterIndex, long x) throws SQLException
setLong
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type BIGINT.public void setFloat(int parameterIndex, float x) throws SQLException
setFloat
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- float value.SQLException
- This exception is thrown if parameter index is not valid.public void setDouble(int parameterIndex, double x) throws SQLException
setDouble
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- double value.SQLException
- This exception is thrown if parameter index is not valid.public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
setBigDecimal
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type Numericpublic void setString(int parameterIndex, String x) throws SQLException
setString
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- String value.SQLException
- This exception is thrown if parameter index is not valid.public void setBytes(int parameterIndex, byte[] x) throws SQLException
setBytes
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type BINARY.public void setDate(int parameterIndex, Date x) throws SQLException
setDate
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- java.sql.Date value.SQLException
- This exception is thrown if parameter index is not valid.public void setTime(int parameterIndex, Time x) throws SQLException
setTime
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- java.sql.Time value.SQLException
- This exception is thrown if parameter index is not valid.public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
setTimestamp
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- java.sql.Timestamp value.SQLException
- This exception is thrown if parameter index is not valid.public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException
setAsciiStream
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type LONGVARCHAR.public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException
setUnicodeStream
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type LONGVARCHAR.public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException
setBinaryStream
in interface PreparedStatement
SQLException
- This exception is always thrown because SAS software
does not support SQL type LONGVARBINARY.public void clearParameters() throws SQLException
clearParameters
in interface PreparedStatement
SQLException
- This exception is required by the interface, but it is never thrown.public void setObject(int parameterIndex, Object x, int sqlType, int scale) throws SQLException
setObject
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- An input object.sqlType
- The target SQL type for the object.scale
- This parameter is ignored. SAS software does not support Decimal or Numeric data
types.SQLException
- This exception may be thrown.public void setObject(int parameterIndex, Object x) throws SQLException
setObject
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- An input object.SQLException
- This exception may be thrown.public void setObject(int parameterIndex, Object x, int sqlType) throws SQLException
setObject
in interface PreparedStatement
parameterIndex
- The first parameter is 1, the second is 2, and so on.x
- An input object.sqlType
- The target SQL type for the object.SQLException
- This exception may be thrown.public boolean execute() throws SQLException
execute
in interface PreparedStatement
SQLException
- This exception may be thrown.ShareNetStatement.execute(java.lang.String)
public ResultSetMetaData getResultSetMetaData() throws SQLException
SQLException
- This exception is thrown if an error condition is detected.execute()
public void addBatch() throws SQLException
addBatch
in interface PreparedStatement
SQLException
- This exception is always thrown.ShareNetStatement.addBatch(java.lang.String)
public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- The java reader object which contains the UNICODE data.length
- The number of characters in the stream.SQLException
- This exception is always thrownpublic void setRef(int parameterIndex, Ref x) throws SQLException
setRef
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing data of an SQL REF Type .SQLException
- This exception is always thrown.public void setBlob(int parameterIndex, Blob x) throws SQLException
setBlob
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing a BLOB.SQLException
- This exception is always thrown.public void setClob(int parameterIndex, Clob x) throws SQLException
setClob
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing a CLOB.SQLException
- This exception is always thrown.public void setArray(int parameterIndex, Array x) throws SQLException
setArray
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing an SQL array.SQLException
- This exception is always thrown.public ResultSetMetaData getMetaData() throws SQLException
getMetaData
in interface PreparedStatement
SQLException
- This exception is thrown if a database error occurs or if the result set is NULL.public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException
setDate
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- The parameter value, a java.sql.Date object.cal
- A Calendar object. Ignored if NULL.SQLException
- This exception may be thrown.public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException
setTime
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- The parameter value, a java.sql.Time object.cal
- A Calendar object. Ignored if NULL.SQLException
- This exception may be thrown.public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
setTimestamp
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- The parameter value, a java.sql.Timestamp value.cal
- A Calendar object. Ignored if NULL.SQLException
- This exception may be thrown.public void setNull(int parameterIndex, int sqlType, String x) throws SQLException
setNull
in interface PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second parameter is 2, and so on.sqlType
- An SQL type code that is defined by java.sql.Types.x
- the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or REFSQLException
- This exception is always thrown.public void setURL(int parameterIndex, URL x) throws SQLException
java.net.URL
value. The driver converts
this to an SQL DATALINK value when it sends it to the database.
This method is not implemented.setURL
in interface PreparedStatement
SQLException
- always thrown.public ParameterMetaData getParameterMetaData() throws SQLException
PreparedStatement
object's parameters.
This method is not implemented.getParameterMetaData
in interface PreparedStatement
SQLException
- always thrown.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |