15.5.2 HiRDBCommandBuilder
- 〈この項の構成〉
(1) コンストラクタ
(a) HiRDBCommandBuilder
- void HiRDBCommandBuilder ()
-
説明:HiRDBCommandBuilder の新しいインスタンスを初期化します。
- void HiRDBCommandBuilder (HiRDBDataAdapter adapter)
-
- 引数
-
HiRDBDataAdapter adapter:HiRDBDataAdapter オブジェクト(DataAdapterプロパティ)
説明:HiRDBDataAdapterオブジェクトを指定して,HiRDBCommandBuilder の新しいインスタンスを初期化します。
(2) プロパティ
(a) CatalogLocation
型:CatalogLocation
既定値:CatalogLocation.Start
説明:サーバ名,カタログ名,スキーマ名,テーブル名で修飾テーブル名を示すときのカタログ名の位置を示します。
例外:HiRDBException
(b) CatalogSeparator
型:string
既定値:""
説明:HiRDBCommandBuilderオブジェクトのカタログ区切り記号として使用する文字列を設定又は取得します。
例外:HiRDBException
(c) ConflictOption
型:ConflictOption
既定値:ConflictOption.CompareAllSearchableValues
説明:該当するオブジェクトが生成するUpdateCommandとDeleteCommandのWHERE句に追加する列の組み合わせ(同時実行チェックの種類)を設定又は取得します。
例外:HiRDBException
(d) DataAdapter
型:HiRDBDataAdapter
既定値:null
説明:SQLステートメントを自動生成する対象のHiRDBDataAdapterオブジェクトを取得又は設定します。
(e) QuotePrefix
型:string
既定値:”(引用符)
説明:列やテーブルの識別子を指定するための開始文字を取得又は設定します。
例外:HiRDBException
(f) QuoteSuffix
型:string
既定値:”(引用符)
説明:列やテーブルの識別子を指定するための終了文字を取得又は設定します。
例外:HiRDBException
(g) SchemaSeparator
型:HiRDBDataAdapter
既定値:.(ピリオド)
説明:認可識別子とそのほかの識別子との間の区切り記号に使用する文字を取得又は設定します。
例外:HiRDBException
(h) SetAllValues
型:bool
既定値:true
説明:UPDATE文で値を更新する列がすべての列かどうかを示す値を,取得又は設定します。
(3) メソッド
(a) Dispose
void Dispose()
Return:void
説明:HiRDBCommandBuilderが使用しているすべてのリソースを解放します。
(b) GetDeleteCommand
- HiRDBCommand GetDeleteCommand()
-
- Return
-
HiRDBCommand:削除を実行するための,自動生成されたHiRDBCommandオブジェクト
- 説明:データベースで削除処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。DataAdapterプロパティのSelectCommandに指定する検索SQL文が次に示す場合は,削除SQL文を作成できません。
-
-
単一表に対する検索ではない
-
表に別名を指定している
-
例外:HiRDBException
- HiRDBCommand GetDeleteCommand(bool)
-
- 引数
-
useColumnsForParameterNames
true:列名に基づいたパラメタ名(@IDなど)
false:@pX形式のパラメタ名(X:1からの序数)
- Return
-
HiRDBCommand:削除を実行するための,自動生成されたHiRDBCommandオブジェクト
- 説明:データベースで削除処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。DataAdapterプロパティのSelectCommandに指定する検索SQL文が次に示す場合は,削除SQL文を作成できません。
-
-
単一表に対する検索ではない
-
表に別名を指定している
-
例外:HiRDBException
- HiRDBCommand GetDeleteCommand (string)
-
- 引数
-
string sTableName:テーブル名
- Return
-
HiRDBCommand:削除を実行するための,自動生成されたHiRDBCommandオブジェクト
説明:データベースで削除処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。
例外:HiRDBException
(c) GetInsertCommand
- HiRDBCommand GetInsertCommand ()
-
- Return
-
HiRDBCommand:挿入を実行するための自動生成されたHiRDBCommandオブジェクト
- 説明:データベースで挿入処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。DataAdapterプロパティのSelectCommandに指定する検索SQL文が次に示す場合,挿入SQL文を作成できません。
-
-
単一表に対する検索ではない。
-
表に別名を指定している。
-
例外:HiRDBException
- HiRDBCommand GetInsertCommand (bool)
-
- 引数
-
useColumnsForParameterNames
true:列名に基づいたパラメタ名(@IDなど)
false:@pX形式のパラメタ名(X:1からの序数)
- Return
-
HiRDBCommand:挿入を実行するための,自動生成されたHiRDBCommandオブジェクト
- 説明:データベースで挿入処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。DataAdapterプロパティのSelectCommandに指定する検索SQL文が次に示す場合,挿入SQL文を作成できません。
-
-
単一表に対する検索ではない
-
表に別名を指定している
-
例外:HiRDBException
- HiRDBCommand GetInsertCommand (string)
-
- 引数
-
string sTableName:テーブル名
- Return
-
HiRDBCommand:挿入を実行するための,自動生成されたHiRDBCommandオブジェクト
説明:データベースで挿入処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。
例外:HiRDBException
(d) GetUpdateCommand
- HiRDBCommand GetUpdateCommand ()
-
- Return
-
HiRDBCommand:更新を実行するための,自動生成されたHiRDBCommand オブジェクト
- 説明:データベースで更新処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。DataAdapterプロパティのSelectCommandに指定する検索SQL文が次に示す場合,更新SQL文を作成できません。
-
-
単一表に対する検索ではない。
-
表に別名を指定している。
-
例外:HiRDBException
- HiRDBCommand GetUpdateCommand (bool)
-
- 引数
-
useColumnsForParameterNames:
true:列名に基づいたパラメタ名(@IDなど)
false:@pX形式のパラメタ名(X:1からの序数)
- Return
-
HiRDBCommand:更新を実行するための自動生成されたHiRDBCommand オブジェクト
- 説明:データベースで更新処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。DataAdapterプロパティのSelectCommandに指定する検索SQL文が次に示す場合,更新SQL文を作成できません。
-
-
単一表に対する検索ではない
-
表に別名を指定している
-
例外:HiRDBException
- HiRDBCommand GetUpdateCommand (string)
-
- 引数
-
string sTableName:テーブル名
- Return
-
HiRDBCommand:更新を実行するための自動生成されたHiRDBCommand オブジェクト
説明:データベースで更新処理を実行するための,自動生成されたHiRDBCommandオブジェクトを取得します。
例外:HiRDBException
(e) QuoteIdentifier
- string QuoteIdentifier(string)
-
- 引数
-
string unquotedIdentifier:HiRDBCommandBuilder#QuotePrefixプロパティの値とHiRDBCommandBuilder#QuoteSuffixプロパティの値で囲む文字列
- Return
-
string:HiRDBCommandBuilder#QuotePrefixプロパティの値とHiRDBCommandBuilder#QuoteSuffixプロパティの値で囲んだ文字列
説明:指定された文字列をHiRDBCommandBuilder#QuotePrefixプロパティの値とHiRDBCommandBuilder#QuoteSuffixプロパティの値で囲って返します。
例外:HiRDBException
(f) RefreshSchema
- void RefreshSchema ()
-
Return:void
説明:INSERT,UPDATE,又はDELETEステートメントを生成するための,データベースのスキーマ情報を更新します。
- void RefreshSchema (string)
-
- 引数
-
string sTableName:テーブル名
Return:void
説明:INSERT,UPDATE,又はDELETEステートメントを生成するための,データベースのスキーマ情報を更新します。
例外:HiRDBException
(g) UnquoteIdentifier
- string UnquoteIdentifier (string)
-
- 引数
-
string quotedIdentifier:HiRDBCommandBuilder#QuotePrefixプロパティの値とHiRDBCommandBuilder#QuoteSuffixプロパティの値で囲んだ文字列
- Return
-
string:先頭のHiRDBCommandBuilder#QuotePrefixプロパティの値と終端のHiRDBCommandBuilder#QuoteSuffixプロパティの値を取った文字列
説明:指定された文字列から先頭のHiRDBCommandBuilder#QuotePrefixプロパティの値と終端のHiRDBCommandBuilder#QuoteSuffixプロパティの値を除いたものを返します。
例外:HiRDBException