Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

16.5.2 HiRDBCommandBuilder

Organization of this subsection
(1) Constructor
(2) Properties
(3) Methods

(1) Constructor

(a) HiRDBCommandBuilder

void HiRDBCommandBuilder ()
Description: Initializes a new instance of HiRDBCommandBuilder.

void HiRDBCommandBuilder (HiRDBDataAdapter adapter)
Argument
HiRDBDataAdapter adapter: HiRDBDataAdapter object (DataAdapter property)
Description: Specifies the HiRDBDataAdapter object and initializes a new instance of HiRDBCommandBuilder.

(2) Properties

(a) CatalogLocation

Type: CatalogLocation

Default value: CatalogLocation.Start

Description: Indicates the location of the catalog name when a server name, catalog name, schema name, and table name are used to express a qualified table name.

Exception: HiRDBException
(b) CatalogSeparator

Type: string

Default value: ""

Description: Sets or acquires the character string used as the catalog delimiter for the HiRDBCommandBuilder object.

Exception: HiRDBException
(c) ConflictOption

Type: ConflictOption

Default value: ConflictOption.CompareAllSearchableValues

Description: Sets or acquires a combination of columns (concurrent execution check type) that are to be added to the WHERE clause of UpdateCommand or DeleteCommand that is created by the corresponding object.

Exception: HiRDBException
(d) DataAdapter

Type: HiRDBDataAdapter

Default value: null

Description: Acquires or sets the HiRDBDataAdapter object for which an SQL statement is to be created automatically.
(e) QuotePrefix

Type: string

Default value: " (double-quotation mark)

Description: Acquires or sets the start character used for specifying a column or table identifier.

Exception: HiRDBException
(f) QuoteSuffix

Type: string

Default value: " (double-quotation mark)

Description: Acquires or sets the end character used for specifying a column or table identifier.

Exception: HiRDBException
(g) SchemaSeparator

Type: HiRDBDataAdapter

Default value: . (period)

Description: Acquires or sets the character used as the delimiter between an authorization identifier and another identifier.

Exception: HiRDBException
(h) SetAllValues

Type: bool

Default value: true

Description: Acquires or sets a value that indicates whether all columns are to be subject to updating of their values by the UPDATE statement.

(3) Methods

(a) GetDeleteCommand

HiRDBCommand GetDeleteCommand()
Return
HiRDBCommand: Automatically created HiRDBCommand object for executing deletion processing
Description: Acquires the automatically created HiRDBCommand object for executing deletion processing on the database. If the retrieval SQL statement specified in SelectCommand of the DataAdapter property satisfies either of the following conditions, the deletion SQL statement cannot be created:
  • This is not a retrieval on a single table.
  • An alias is specified for the table.
Exception: HiRDBException

HiRDBCommand GetDeleteCommand(bool)
Argument
useColumnsForParameterNames
true: Parameter name based on a column name (such as @ID)
false: Parameter name in the @pX format (X: ordinal number beginning at 1)
Return
HiRDBCommand: Automatically created HiRDBCommand object for executing deletion processing
Description: Acquires the automatically created HiRDBCommand object for executing deletion processing on the database. If the retrieval SQL statement specified in SelectCommand of the DataAdapter property satisfies either of the following conditions, the deletion SQL statement cannot be created:
  • This is not a retrieval on a single table.
  • An alias is specified for the table.
Exception: HiRDBException

HiRDBCommand GetDeleteCommand (string)
Argument
string s TableName: Table name
Return
HiRDBCommand: HiRDBCommand object that was automatically created to execute deletion processing
Description: Acquires the automatically created HiRDBCommand object for executing deletion processing on the database.
Exception: HiRDBException
(b) GetInsertCommand

HiRDBCommand GetInsertCommand ()
Return
HiRDBCommand: HiRDBCommand object that was automatically created to execute insertion processing
Description: Acquires the automatically created HiRDBCommand object for executing insertion processing on the database. If the retrieval SQL statement specified in SelectCommand of the DataAdapter property satisfies either of the following conditions, the insertion SQL statement cannot be created:
  • This is not a retrieval on a single table.
  • An alias is specified for the table.
Exception: HiRDBException

HiRDBCommand GetInsertCommand (bool)
Argument
useColumnsForParameterNames
true: Parameter name based on a column name (such as @ID)
false: Parameter name in the @pX format (X: ordinal number beginning at 1)
Return
HiRDBCommand: Automatically created HiRDBCommand object for executing insertion processing
Description: Acquires the automatically created HiRDBCommand object for executing insertion processing on the database. If the retrieval SQL statement specified in SelectCommand of the DataAdapter property satisfies either of the following conditions, the insertion SQL statement cannot be created:
  • This is not a retrieval on a single table.
  • An alias is specified for the table.
Exception: HiRDBException

HiRDBCommand GetInsertCommand (string)
Argument
string sTableName: Table name
Return
HiRDBCommand: Automatically created HiRDBCommand object for executing insertion processing
Description: Acquires the automatically created HiRDBCommand object for executing insertion processing on the database.
Exception: HiRDBException
(c) GetUpdateCommand

HiRDBCommand GetUpdateCommand ()
Return
HiRDBCommand: Automatically created HiRDBCommand object for executing update processing
Description: Acquires the automatically created HiRDBCommand object for executing update processing on the database. If the retrieval SQL statement specified in SelectCommand of the DataAdapter property satisfies either of the following conditions, the updating SQL statement cannot be created:
  • This is not a retrieval on a single table.
  • An alias is specified for the table.
Exception: HiRDBException

HiRDBCommand GetUpdateCommand (bool)
Argument
useColumnsForParameterNames
true: Parameter name based on a column name (such as @ID)
false: Parameter name in the @pX format (X: ordinal number beginning at 1)
Return
HiRDBCommand: Automatically created HiRDBCommand object for executing update processing
Description: Acquires the automatically created HiRDBCommand object for executing update processing on the database. If the retrieval SQL statement specified in SelectCommand of the DataAdapter property satisfies either of the following conditions, the updating SQL statement cannot be created:
  • This is not a retrieval on a single table.
  • An alias is specified for the table.
Exception: HiRDBException

HiRDBCommand GetUpdateCommand (string)
Argument
string s TableName: Table name
Return
HiRDBCommand: HiRDBCommand object that was automatically created to execute update processing
Description: Acquires the automatically created HiRDBCommand object for executing update processing on the database.
Exception: HiRDBException
(d) QuoteIdentifier

string QuoteIdentifier(string)
Argument
string unquotedIdentifier: Character string enclosed by the HiRDBCommandBuilder#QuotePrefix and HiRDBCommandBuilder#QuoteSuffix property values
Return
string: Character string enclosed by the HiRDBCommandBuilder#QuotePrefix and HiRDBCommandBuilder#QuoteSuffix property values
Description: Returns a specified character string enclosed by the HiRDBCommandBuilder#QuotePrefix value and the HiRDBCommandBuilder#QuoteSuffix property value.
Exception: HiRDBException
(e) RefreshSchema

void RefreshSchema ()
Return: void
Description: Updates database schema information to create an INSERT, UPDATE, or DELETE statement.

void RefreshSchema (string)
Argument
string s TableName: Table name
Return: void
Description: Updates database schema information to create the INSERT, UPDATE, or DELETE statement.
Exception: HiRDBException
(f) UnquoteIdentifier

string UnquoteIdentifier (string)
Argument
string quotedIdentifier: Character string enclosed by the HiRDBCommandBuilder#QuotePrefix and HiRDBCommandBuilder#QuoteSuffix property values
Return
string: Value obtained by removing the HiRDBCommandBuilder#QuotePrefix property value at the beginning and the HiRDBCommandBuilder#QuoteSuffix property value at the end of a character string
Description: Returns the value obtained by removing the HiRDBCommandBuilder#QuotePrefix property value at the beginning and the HiRDBCommandBuilder#QuoteSuffix property value at the end of a specified character string.
Exception: HiRDBException