|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.rio.MVAPreparedStatement
public class MVAPreparedStatement
Field Summary |
---|
Fields inherited from class com.sas.rio.MVAStatement |
---|
libref |
Constructor Summary | |
---|---|
MVAPreparedStatement(MVAConnection inconnection,
java.lang.String sql,
java.util.Properties props)
|
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. |
java.sql.ResultSet |
executeQuery()
Executes a prepared SQL query and returns the ResultSet. |
int |
executeUpdate()
Executes an SQL INSERT, UPDATE or DELETE statement. |
java.sql.ResultSetMetaData |
getMetaData()
JDBC 2.0 Retrieves a ResultSetMetaData object that contains
information about the columns of the ResultSet object
that will be returned when this PreparedStatement object
is executed. |
java.sql.ParameterMetaData |
getParameterMetaData()
Retrieves the number, types and properties of this PreparedStatement object's parameters. |
void |
registerOutParameter(int parameterIndex,
int sqlType,
java.lang.String x)
JDBC 2.0 This method is not yet supported. |
void |
setArray(int parameterIndex,
java.sql.Array x)
JDBC 2.0 Sets a parameter to an Array object. |
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
Sets a parameter to a Java java.io.InputStream. |
void |
setBigDecimal(int parameterIndex,
java.math.BigDecimal x)
Sets a parameter to a Java BigDecimal value. |
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
Sets a parameter to a Java java.io.InputStream. |
void |
setBlob(int parameterIndex,
java.sql.Blob x)
JDBC 2.0 Sets a parameter to a BLOB object. |
void |
setBoolean(int parameterIndex,
boolean x)
Sets the designated parameter to the given Java boolean value. |
void |
setByte(int parameterIndex,
byte x)
Sets the designated parameter to the given Java byte value. |
void |
setBytes(int parameterIndex,
byte[] x)
Sets a parameter to a Java byte array value. |
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length)
JDBC 2.0 Sets a parameter to java.io.Reader object. |
void |
setClob(int parameterIndex,
java.sql.Clob x)
JDBC 2.0 Sets a parameter to a CLOB object. |
void |
setDate(int parameterIndex,
java.sql.Date x)
Sets a parameter to a Java java.sql.Date value. |
void |
setDate(int parameterIndex,
java.sql.Date x,
java.util.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,
java.lang.String x)
JDBC 2.0 Sets a parameter to SQL NULL. |
void |
setObject(int parameterIndex,
java.lang.Object x)
Sets a parameter to the default type. |
void |
setObject(int parameterIndex,
java.lang.Object x,
int sqlType)
Sets a parameter to the input type. |
void |
setObject(int parameterIndex,
java.lang.Object x,
int sqlType,
int scale)
Sets a parameter to the input type. |
void |
setRef(int parameterIndex,
java.sql.Ref x)
JDBC 2.0 Sets a parameter to a REF(<structured-type>) object. |
void |
setShort(int parameterIndex,
short x)
Sets the designated parameter to the given Java short value. |
void |
setString(int parameterIndex,
java.lang.String x)
Sets a parameter to a Java string value. |
void |
setTime(int parameterIndex,
java.sql.Time x)
Sets a parameter to a Java java.sql.Time value. |
void |
setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
JDBC 2.0 Sets a parameter to a java.sql.Time value. |
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x)
Sets a parameter to a Java java.sql.Timestamp value. |
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
JDBC 2.0 Sets a parameter to a java.sql.Timestamp value. |
void |
setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
Deprecated. |
void |
setURL(int parameterIndex,
java.net.URL x)
Sets the designated parameter to the given java.net.URL value. |
Constructor Detail |
---|
public MVAPreparedStatement(MVAConnection inconnection, java.lang.String sql, java.util.Properties props)
Method Detail |
---|
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
executeQuery
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is thrown if an error condition is detected.public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is thrown if an error condition is detected.public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException
setNull
in interface java.sql.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.
java.sql.SQLException
- This exception is thrown if a database error is detected or if
the sqlType is not FLOAT, DOUBLE, INTEGER, TIME, DATE or TIMESTAMP. If the sqlType is
CHAR, VARCHAR or LONGVARCHAR, an exception will not be thrown, and the value in the database
will be set to a blank.
SAS software does not allow other types to be NULL.public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException
boolean
value.
The driver converts this
to an SQL BIT
value when it sends it to the database.
The IOM JDBC driver supports this method for NUM columns, but does not support it for CHAR columns.
setBoolean
in interface java.sql.PreparedStatement
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter value
java.sql.SQLException
- if a database access error occurspublic void setByte(int parameterIndex, byte x) throws java.sql.SQLException
byte
value.
The driver converts this
to an SQL TINYINT
value when it sends it to the database.
setByte
in interface java.sql.PreparedStatement
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter value
java.sql.SQLException
- if a database access error occurspublic void setShort(int parameterIndex, short x) throws java.sql.SQLException
short
value.
The driver converts this
to an SQL SMALLINT
value when it sends it to the database.
setShort
in interface java.sql.PreparedStatement
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter value
java.sql.SQLException
- if a database access error occurspublic void setInt(int parameterIndex, int x) throws java.sql.SQLException
setInt
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- An int value.
java.sql.SQLException
- This exception is thrown if parameterIndex is not valid.public void setLong(int parameterIndex, long x) throws java.sql.SQLException
setLong
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown because SAS software
does not support SQL type BIGINT.public void setFloat(int parameterIndex, float x) throws java.sql.SQLException
setFloat
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- float value.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setDouble(int parameterIndex, double x) throws java.sql.SQLException
setDouble
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- double value.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException
setBigDecimal
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown because SAS software
does not support SQL type Numeric.public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException
setString
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- String value.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException
setBytes
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown because SAS software
does not support SQL type BINARY.public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- java.sql.Date value.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- java.sql.Time value.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- java.sql.Timestamp value.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown because SAS software
does not support SQL type LONGVARCHAR.public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setUnicodeStream
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown because SAS software
does not support SQL type LONGVARCHAR.public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown because SAS software
does not support SQL type LONGVARBINARY.public void clearParameters() throws java.sql.SQLException
clearParameters
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is required by the interface, but it is never thrown.public void setObject(int parameterIndex, java.lang.Object x, int sqlType, int scale) throws java.sql.SQLException
setObject
in interface java.sql.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.
java.sql.SQLException
- This exception may be thrown.public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
parameterIndex
- The first parameter is 1, the second parameter is 2, and so on.x
- An input object.
java.sql.SQLException
- This exception may be thrown.public void setObject(int parameterIndex, java.lang.Object x, int sqlType) throws java.sql.SQLException
setObject
in interface java.sql.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.
java.sql.SQLException
- This exception may be thrown.public boolean execute() throws java.sql.SQLException
execute
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception may be thrown.MVAStatement.execute(java.lang.String)
public void addBatch() throws java.sql.SQLException
addBatch
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is always thrown.MVAStatement.addBatch(java.lang.String)
public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws java.sql.SQLException
setCharacterStream
in interface java.sql.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.
java.sql.SQLException
- This exception is always thrownpublic void setRef(int parameterIndex, java.sql.Ref x) throws java.sql.SQLException
setRef
in interface java.sql.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 .
java.sql.SQLException
- This exception is always thrown as SAS software does not support REF SQL type.public void setBlob(int parameterIndex, java.sql.Blob x) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing a BLOB.
java.sql.SQLException
- This exception is always thrown as SAS software does not support BLOB SQL type.public void setClob(int parameterIndex, java.sql.Clob x) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing a CLOB.
java.sql.SQLException
- This exception is always thrown as SAS software does not support CLOB SQL type.public void setArray(int parameterIndex, java.sql.Array x) throws java.sql.SQLException
setArray
in interface java.sql.PreparedStatement
parameterIndex
- The parameter index. The first parameter is 1, the second is 2, and so on.x
- An object representing an SQL array.
java.sql.SQLException
- This exception is always thrown as SAS software does not support Array SQL type.public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
ResultSetMetaData
object that contains
information about the columns of the ResultSet
object
that will be returned when this PreparedStatement
object
is executed.
getMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
- This exception is thrown if a database error occurs or if the result set is NULL.public void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException
setDate
in interface java.sql.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 cal is NULL.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException
setTime
in interface java.sql.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 cal is NULL.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException
setTimestamp
in interface java.sql.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 cal is NULL.
java.sql.SQLException
- This exception is thrown if parameter index is not valid.public void setNull(int parameterIndex, int sqlType, java.lang.String x) throws java.sql.SQLException
setNull
in interface java.sql.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
- An input String.
java.sql.SQLException
- This exception is always thrown.public void registerOutParameter(int parameterIndex, int sqlType, java.lang.String x) throws java.sql.SQLException
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
- An input String.
java.sql.SQLException
- This exception is always thrown.public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
getParameterMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
- Always thrown to indicate that this method is not implemented.public void setURL(int parameterIndex, java.net.URL x) throws java.sql.SQLException
setURL
in interface java.sql.PreparedStatement
java.sql.SQLException
- Always thrown to indicate that this method is not implemented.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |