このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


Interface XParameters
Language

The 解放する/自由な and Open 生産性 控訴
解放(する)d: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: 星/主役にする :: sdbc ::

interface XParameters
Description
is used for parameter setting, 一般的に 器具/実施するd in 合同 with PreparedStatements.

公式文書,認める: The setXXX methods for setting IN parameter values must 明示する types that are 両立できる with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type Integer, then the method XParameters::setInt() should be used.

If 独断的な parameter type 転換s are 要求するd, the method XParameters::setObject() should be used with a 的 SQL type.

Example of setting a parameter; 反対/詐欺 is an active 関係.

Example
pstmt = 反対/詐欺.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?")
 pstmt.setDouble(1, 153833.00)
 pstmt.setLong(2, 110592)
 
See also
XPreparedStatement

Methods' 要約
setNull 始める,決めるs the 指定するd parameter to SQL NULL.  
setObjectNull 始める,決めるs the 指定するd parameter to SQL NULL. This 見解/翻訳/版 of setNull should be used for 使用者-指名するd types and REF type parameters. Examples of 使用者-指名するd types 含む: STRUCT, DISTINCT, OBJECT, and 指名するd array types.  
setBoolean 始める,決めるs the 指定するd parameter to a boolean value. The driver 変えるs this to a SQL BIT value when it sends it to the database.  
setByte 始める,決めるs the 指定するd parameter to a byte value. The driver 変えるs this to a SQL TINYINT value when it sends it to the database.  
setShort 始める,決めるs the 指定するd parameter to a short value. The driver 変えるs this to a SQL SMALLINT value when it sends it to the database.  
setInt 始める,決めるs the 指定するd parameter to a long value. The driver 変えるs this to a SQL INTEGER value when it sends it to the database.  
setLong 始める,決めるs the 指定するd parameter to a hyper value. The driver 変えるs this to a SQL BIGINT value when it sends it to the database.  
setFloat 始める,決めるs the 指定するd parameter to a float value. The driver 変えるs this to a SQL FLOAT value when it sends it to the database.  
setDouble 始める,決めるs the 指定するd parameter to a 二塁打 value. The driver 変えるs this to a SQL DOUBLE value when it sends it to the database.  
setString 始める,決めるs the 指定するd parameter to a string value. The driver 変えるs this to a SQL VARCHAR or LONGVARCHAR value (depending on the argument's size 親族 to the driver's 限界s on VARCHARs) when it sends it to the database.  
setBytes 始める,決めるs the 指定するd parameter to a sequence of bytes. The driver 変えるs this to a SQL VARBINARY or LONGVARBINARY (depending on the argument's size 親族 to the driver's 限界s on VARBINARYs) when it sends it to the database.  
setDate 始める,決めるs the 指定するd parameter to a date value. The driver 変えるs this to a SQL DATE value when it sends it to the database.  
setTime 始める,決めるs the 指定するd parameter to a time value. The driver 変えるs this to a SQL TIME value when it sends it to the database.  
setTimestamp 始める,決めるs the 指定するd parameter to a datetime value. The driver 変えるs this to a SQL TIMESTAMP value when it sends it to the database.  
setBinaryStream 始める,決めるs the 指定するd parameter to the given input stream, which will have the 明示するd number of bytes. When a very large binary value is input to a LONGVARBINARY or LONGVARCHAR parameter, it may be more practical to send it 経由で an ::com::sun::星/主役にする::io::XInputStream . SDBC will read the data from the stream as needed, until it reaches end-of-とじ込み/提出する.  
setCharacterStream 始める,決めるs the 指定するd parameter to the given input stream, which will have the 明示するd number of bytes. When a very large binary value is input to a LONGVARCHAR parameter, it may be more practical to send it 経由で a ::com::sun::星/主役にする::io::XInputStream . SDBC will read the data from the stream as needed, until it reaches end-of-とじ込み/提出する.  
setObject 始める,決めるs the value of a parameter using an any.  
setObjectWithInfo 始める,決める a value from the Datatype ANY for a parameter.  
setRef 始める,決めるs a REF(<structured-type>) parameter.  
setBlob 始める,決めるs a BLOB parameter.  
setClob 始める,決めるs a CLOB parameter.  
setArray 始める,決めるs an Array parameter.  
clearParameters (疑いを)晴らすs the 現在の parameter values すぐに.  
Methods' 詳細(に述べる)s
setNull
無効の
setNull( [in] long  parameterIndex,
[in] long  sqlType )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to SQL NULL.
setObjectNull
無効の
setObjectNull( [in] long  parameterIndex,
[in] long  sqlType,
[in] string  typeName )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to SQL NULL. This 見解/翻訳/版 of setNull should be used for 使用者-指名するd types and REF type parameters. Examples of 使用者-指名するd types 含む: STRUCT, DISTINCT, OBJECT, and 指名するd array types.

公式文書,認める: To be portable, 使用/適用s must give the SQL type code and the fully-qualified SQL type 指名する when 明示するing a NULL 使用者-defined or REF parameter. In the 事例/患者 of a 使用者-指名するd type the 指名する is the type 指名する of the parameter itself. For a REF parameter the 指名する is the type 指名する of the 言及/関連d type. If a SDBC driver does not need the type code or type 指名する (警察などへの)密告,告訴(状), it may ignore it.
Although it is ーするつもりであるd for 使用者-指名するd and Ref parameters, this method may be used to 始める,決める a null parameter of any JDBC type. If the parameter does not have a 使用者-指名するd or REF type, the given typeName is ignored.

Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter sqlType
the type of the column to 始める,決める to NULL
Parameter typeName
the 指名する of the type
Throws
SQLException if a database 接近 error occurs.
setBoolean
無効の
setBoolean( [in] long  parameterIndex,
[in] boolean  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a boolean value. The driver 変えるs this to a SQL BIT value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setByte
無効の
setByte( [in] long  parameterIndex,
[in] byte  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a byte value. The driver 変えるs this to a SQL TINYINT value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setShort
無効の
setShort( [in] long  parameterIndex,
[in] short  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a short value. The driver 変えるs this to a SQL SMALLINT value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setInt
無効の
setInt( [in] long  parameterIndex,
[in] long  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a long value. The driver 変えるs this to a SQL INTEGER value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setLong
無効の
setLong( [in] long  parameterIndex,
[in] hyper  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a hyper value. The driver 変えるs this to a SQL BIGINT value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setFloat
無効の
setFloat( [in] long  parameterIndex,
[in] float  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a float value. The driver 変えるs this to a SQL FLOAT value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setDouble
無効の
setDouble( [in] long  parameterIndex,
[in] 二塁打  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a 二塁打 value. The driver 変えるs this to a SQL DOUBLE value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setString
無効の
setString( [in] long  parameterIndex,
[in] string  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a string value. The driver 変えるs this to a SQL VARCHAR or LONGVARCHAR value (depending on the argument's size 親族 to the driver's 限界s on VARCHARs) when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setBytes
無効の
setBytes( [in] long  parameterIndex,
[in] sequence< byte >  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a sequence of bytes. The driver 変えるs this to a SQL VARBINARY or LONGVARBINARY (depending on the argument's size 親族 to the driver's 限界s on VARBINARYs) when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setDate
無効の
setDate( [in] long  parameterIndex,
[in] ::com::sun::星/主役にする::util::Date  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a date value. The driver 変えるs this to a SQL DATE value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setTime
無効の
setTime( [in] long  parameterIndex,
[in] ::com::sun::星/主役にする::util::Time  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a time value. The driver 変えるs this to a SQL TIME value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setTimestamp
無効の
setTimestamp( [in] long  parameterIndex,
[in] ::com::sun::星/主役にする::util::DateTime  x )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to a datetime value. The driver 変えるs this to a SQL TIMESTAMP value when it sends it to the database.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setBinaryStream
無効の
setBinaryStream( [in] long  parameterIndex,
[in] ::com::sun::星/主役にする::io::XInputStream  x,
[in] long  length )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to the given input stream, which will have the 明示するd number of bytes. When a very large binary value is input to a LONGVARBINARY or LONGVARCHAR parameter, it may be more practical to send it 経由で an ::com::sun::星/主役にする::io::XInputStream . SDBC will read the data from the stream as needed, until it reaches end-of-とじ込み/提出する.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Parameter length
the number of bytes in the stream
Throws
SQLException if a database 接近 error occurs.
setCharacterStream
無効の
setCharacterStream( [in] long  parameterIndex,
[in] ::com::sun::星/主役にする::io::XInputStream  x,
[in] long  length )
raises( SQLException );

Description
始める,決めるs the 指定するd parameter to the given input stream, which will have the 明示するd number of bytes. When a very large binary value is input to a LONGVARCHAR parameter, it may be more practical to send it 経由で a ::com::sun::星/主役にする::io::XInputStream . SDBC will read the data from the stream as needed, until it reaches end-of-とじ込み/提出する.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Parameter length
the number of characters in the stream
Throws
SQLException if a database 接近 error occurs.
setObject
無効の
setObject( [in] long  parameterIndex,
[in] any  x )
raises( SQLException );

Description
始める,決めるs the value of a parameter using an any.

The given 反対する will be 変えるd to the targetSqlType before 存在 sent to the database. If the 反対する has a custom mapping (is of a class 器具/実施するing SQLData), the SDBC driver should call its method writeSQL to 令状 it to the SQL data stream. If, on the other 手渡す, the 反対する is of a service 器具/実施するing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

公式文書,認める that this method may be used to pass database-明確な/細部 abstract data types.

Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setObjectWithInfo
無効の
setObjectWithInfo( [in] long  parameterIndex,
[in] any  x,
[in] long  targetSqlType,
[in] long  規模 )
raises( SQLException );

Description
始める,決める a value from the Datatype ANY for a parameter.

The given 反対する will be 変えるd to the targetSqlType before 存在 sent to the database. If the 反対する has a custom mapping (is of a class 器具/実施するing SQLData), the SDBC driver should call its method writeSQL to 令状 it to the SQL data stream. If, on the other 手渡す, the 反対する is of a service 器具/実施するing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

公式文書,認める that this method may be used to pass database-明確な/細部 abstract data types.

Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Parameter targetSqlType
the SQL type (as defined in DataType ) to be sent to the database. The 規模 argument may その上の qualify this type.
Parameter 規模
for DataType::DECIMAL or DataType::NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
Throws
SQLException if a database 接近 error occurs.
setRef
無効の
setRef( [in] long  parameterIndex,
[in] XRef  x )
raises( SQLException );

Description
始める,決めるs a REF(&lt;structured-type&gt;) parameter.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setBlob
無効の
setBlob( [in] long  parameterIndex,
[in] XBlob  x )
raises( SQLException );

Description
始める,決めるs a BLOB parameter.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setClob
無効の
setClob( [in] long  parameterIndex,
[in] XClob  x )
raises( SQLException );

Description
始める,決めるs a CLOB parameter.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
setArray
無効の
setArray( [in] long  parameterIndex,
[in] XArray  x )
raises( SQLException );

Description
始める,決めるs an Array parameter.
Parameter parameterIndex
the first parameter is 1, the second is 2, ...
Parameter x
the parameter value
Throws
SQLException if a database 接近 error occurs.
clearParameters
無効の
clearParameters()
raises( SQLException );

Description
(疑いを)晴らすs the 現在の parameter values すぐに.

In general, parameter values remain in 軍隊 for repeated use of a 声明. Setting a parameter value automatically (疑いを)晴らすs its previous value. However, in some 事例/患者s it is useful to すぐに 解放(する) the 資源s used by the 現在の parameter values; this can be done by calling clearParameters.

Throws
SQLException if a database 接近 error occurs.
最高の,を越す of Page

Apache Software Foundation

Copyright & License | Privacy | 接触する Us | 寄付する | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are 登録(する)d trademarks of The Apache ソフトウェア 創立/基礎. The Apache feather logo is a trademark of The Apache ソフトウェア 創立/基礎. Other 指名するs appearing on the 場所/位置 may be trademarks of their 各々の owners.