IDatabaseQuery¶
- class IDatabaseQuery¶
Bases:
ImpactCOMWrapperBase- Description:
Provides methods and properties for reading data from a database using any SQL select statement.
- Remarks:
The IDatabaseQuery object supports read-only, forward-only scrolling through a result set. You can run multiple IDatabaseQuery objects simultaneously if required. Always use parameters if possible to pass values that may change or are entered by a user. Introduced in Impact 11.0.0.35.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property active¶
Gets Active.
- Description:
Determines if the query is currently active.
- Returns:
The value of Active.
- Return type:
active (bool)
- property column_count¶
Gets column_count.
- Description:
Determines the number of columns in the result set.
- Returns:
The value of column_count.
- Return type:
column_count (int)
- property connection¶
Gets Connection.
- Description:
Returns the IDatabaseConnection for this query.
- Returns:
The value of Connection.
- Return type:
- property is_empty¶
Gets is_empty.
- Description:
Determines if the result set contains no rows.
- Returns:
The value of is_empty.
- Return type:
is_empty (bool)
- property is_eof¶
Gets is_eof.
- Description:
Determines if the last record in the result set has been reached.
- Returns:
The value of is_eof.
- Return type:
is_eof (bool)
- property parameter_count¶
Gets parameter_count.
- Description:
Returns the number of parameters required in the SQL.
- Returns:
The value of parameter_count.
- Return type:
parameter_count (int)
- property sql¶
Gets SQL.
- Description:
Gets/sets the SQL for the query. You cannot set the SQL once the query is active.
- Returns:
The value of SQL.
- Return type:
sql (str)
- property table_name¶
Gets table_name.
- Description:
Gets/sets the table name for the query. Assigning a table name means that Impact will load the internal types from the database dictionary.
- Returns:
The value of table_name.
- Return type:
table_name (str)
- close()¶
- Description:
Closes the query.
- column(index)¶
- Description:
Returns a specific IDatabaseColumnValue object by index or name.
- Parameters:
index (any) – Specifies the index or name of the object to retrieve.
- get_date_time(date_column, time_column)¶
- Description:
Combines values from both a date and time column into a single datetime value.
- Parameters:
date_column (any) – Specifies the index or name of the date column.
time_column (any) – Specifies the index or name of the time column
- move_next()¶
- Description:
Moves the query to the next record in the result set.
- open()¶
- Description:
Opens the query and moves to the first row in the result set.
- parameter(index)¶
- Description:
Returns a specific IDatabaseParameterValue object by index or name.
- Parameters:
index (any) – Specifies the name or index of the object to retrieve.