バージョンごとのドキュメント一覧

SET DESCRIPTOR

SET DESCRIPTOR <refpurpose>set information in an SQL descriptor area</refpurpose> — SQL記述子領域に情報を設定します。

概要

SET DESCRIPTOR descriptor_name descriptor_header_item = value [, ... ]
SET DESCRIPTOR descriptor_name VALUE number descriptor_item = value [, ...]

説明

<title>Description</title>

<command>SET DESCRIPTOR</command> populates an SQL descriptor area with values. The descriptor area is then typically used to bind parameters in a prepared query execution. SET DESCRIPTORはSQL記述子領域に値を投入します。 その後、通常、記述子領域はプリペアド問い合わせ実行においてパラメータをバインドするために使用されます。

This command has two forms: The first form applies to the descriptor <quote>header</quote>, which is independent of a particular datum. The second form assigns values to particular datums, identified by number. このコマンドは2つの構文があります。 最初の構文は、特定のデータと独立した、記述子のヘッダに適用します。 2番目の構文は、番号で識別される特定のデータに値を割り当てます。

パラメータ

<title>Parameters</title>
descriptor_name #

A descriptor name. 記述子の名前です。

descriptor_header_item #

A token identifying which header information item to set. Only <literal>COUNT</literal>, to set the number of descriptor items, is currently supported. 設定するヘッダ情報項目を識別するトークンです。 記述子項目数を設定するCOUNTのみが現在サポートされています。

number #

The number of the descriptor item to set. The count starts at 1. 設定する記述子項目の番号です。 番号は1から数えます。

descriptor_item #

A token identifying which item of information to set in the descriptor. See <xref linkend="ecpg-named-descriptors"/> for a list of supported items. 記述子内のどの項目の情報を設定するかを識別するトークンです。 サポートされる項目のリストについては36.7.1を参照してください。

value #

A value to store into the descriptor item. This can be an SQL constant or a host variable. 記述子項目に格納する値です。 これはSQL定数またはホスト変数とすることができます。

<title>Examples</title>
EXEC SQL SET DESCRIPTOR indesc COUNT = 1;
EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = 2;
EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = :val1;
EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val1, DATA = 'some string';
EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2null, DATA = :val2;

互換性

<title>Compatibility</title>

<command>SET DESCRIPTOR</command> is specified in the SQL standard. SET DESCRIPTORは標準SQLで規定されています。

関連項目

<title>See Also</title> ALLOCATE DESCRIPTOR, GET DESCRIPTOR