Namespace: Consultingwerk.SmartComponents.Implementation
Class 
SmartTempTableAdapter Copy to Clipboard
Parent classes:
Inherits: Consultingwerk.SmartComponents.Base.SmartDataAdapter
Implements: Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource, Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataTarget, ICustomTypeDescriptor, IHasDesignerVerbs, Consultingwerk.SmartComponents.Interfaces.ISmartDataSource, Consultingwerk.SmartComponents.Interfaces.ISmartDataTarget, Consultingwerk.SmartComponents.Interfaces.ISmartFilterTarget, Consultingwerk.SmartComponents.Interfaces.ISmartNavigationTarget, Consultingwerk.SmartComponents.Interfaces.ISortableDataSource, Consultingwerk.SmartComponents.Interfaces.ISupportsRefreshData, Consultingwerk.SmartComponents.Interfaces.ISupportsReposition, System.ComponentModel.ISupportInitialize

File:SmartTempTableAdapter
Purpose:A SmartDataAdapter implementation that can be used to
navigate and update any temp-table using the
SmartComponent Library classes
Description:The SmartTempTableAdapter does not connect to any backend
by itself, if can be used to work with Temp-Tables that
are already available on the client.
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Wed Aug 11 20:00:27 CEST 2010
Usage:1.) Create an Instance of the SmartTempTableAdapter
(this can be done using the VisualDesigner)
2.) Assign the handle of the temp-table to the
TempTableHandle property
3.) Call RetrieveData



Top Method Summary
Options Name Purpose
AttachSchemaToBindingSource (BindingSource) Attaches the schema to the BindingSource
CancelCreateRecord () Invoked from the SmartDataTarget to cancel the creation of a new row
CancelCreateRowHandler (Object, CancelCreateRowEventArgs) Handler for the CancelCreateRow event of the ProBindingSource. A Row that has been created using CreateRowHandler gets reverted.
CloseQuery () Empty the DATASET inside the DataAdapter and reopen Query.
CreateRecord () Creates a new record
CreateRowHandler (Object, CreateRowEventArgs) Handler for the CreateRow event of the ProBindingSource. A new Row gets created.
DeleteRow () Deletes the current record from the EntityTable
ROWID GetCurrentRowid () Returns the Current Rowids
CHARACTER GetFieldValues (character) Returns a CHR(1) delimited list of field values from the DataSource
Consultingwerk.ListQueryExpressionByTable GetNewFilterValues () Builds an empty ListQueryExpressionByTable instance and raises the CollectFilterValues event
CHARACTER MergeQueryStrings (character, ListQueryExpressionByTable) Merges two Query Strings
OnAfterAssignRecord (AfterAssignRecordEventArgs) Raises the AfterAssignRecord event
OnAfterCancelCreateRecord (AfterCancelCreateRecordEventArgs) Raises the AfterCancelCreateRecord event
OnAfterCreateRecord (AfterCreateRecordEventArgs) Raises the AfterCreateRecord event
OnAfterDeleteRecord (AfterDeleteRecordEventArgs) Raises the AfterDeleteRecord event
OnAfterUpdateRecord (AfterUpdateRecordEventArgs) Raises the AfterUpdateRecord event
OnBeforeAssignRecord (BeforeAssignRecordEventArgs) Raise the BeforeAssignRecord event
OnBeforeCancelCreateRecord (BeforeCancelCreateRecordEventArgs) Raises the BeforeCancelCreateRecord event
OnBeforeCreateRecord (BeforeCreateRecordEventArgs) Raises the BeforeCreateRecord event
OnBeforeDeleteRecord (BeforeDeleteRecordEventArgs) Raises the BeforeDeleteRecord event
OnBeforeUpdateRecord (BeforeUpdateRecordEventArgs) Raises the BeforeUpdateRecord event
OnCollectFilterValues (CollectFilterValuesEventArgs) Raises the CollectFilterValues event
PositionChangedHandler (Object, EventArgs) Event handler for the PositionChanged event of the BindingSource object
RefreshData () Refreshes the current data
RepositionCurrentRow () Repositions the Query to the current row
RepositionToRowid (rowid[]) Repositions to a Rowid Array
LOGICAL RetrieveData () RetrieveData reads Data from a Datasource and links the DataHandle with a BindingSource inside the Instance of SmartTempTableAdapter.
SetQuerySort (character) Overridable Setter for QuerySort property
UpdateRow () UpdateRow submits the changes to a buffer into the Database. Called by SmartViewerControl * Enforced by Interface ISmartDataSource.
UpdateRow (logical) UpdateRow submits the changes to a buffer into the Database. Called by SmartViewerControl

Top Constructor Summary
Options Name Purpose
SmartTempTableAdapter () Constructor for the SmartTempTableAdapter class
SmartTempTableAdapter (IContainer) Constructor for the SmartTempTableAdapter class

Top Event Summary
Options Name Purpose
AfterAssignRecord (Object, AfterAssignRecordEventArgs) Event raised after a record has been assigned
AfterCancelCreateRecord (Object, AfterCancelCreateRecordEventArgs) Event fired after the creation of a record has been cancelled
AfterCreateRecord (Object, AfterCreateRecordEventArgs) Event fired after a record has been created
AfterDeleteRecord (Object, AfterDeleteRecordEventArgs) Event raised after a record has been deleted
AfterUpdateRecord (Object, AfterUpdateRecordEventArgs) Event raised after a record has been updated
BeforeAssignRecord (Object, BeforeAssignRecordEventArgs) Event raised before assigning to a record
BeforeCancelCreateRecord (Object, BeforeCancelCreateRecordEventArgs) Raised before the creation of the record will be cancelled
BeforeCreateRecord (Object, BeforeCreateRecordEventArgs) Event fired before a record will be created
BeforeDeleteRecord (Object, BeforeDeleteRecordEventArgs) Event raised before a record will be deleted
BeforeUpdateRecord (Object, BeforeUpdateRecordEventArgs) Raised before the a record is updated
CollectFilterValues (Object, CollectFilterValuesEventArgs) Event raised to collect Filter Values from Filter Sources

Top Property Summary
Options Name Purpose
HANDLE BufferHandle
LOGICAL CreateNewBuffer
Consultingwerk.ListQueryExpressionByTable FetchFilterValues
LOGICAL FirstTime
HANDLE QueryHandle
CHARACTER QuerySort
CHARACTER QueryString
HANDLE TempTableHandle


Method Detail
Top

AttachSchemaToBindingSource (BindingSource)

Purpose: Attaches the schema to the BindingSource
Notes:

Parameters:
poBindingSource Progress.Data.BindingSource
The BindingSource to attach the schema to
Top

CancelCreateRecord ()

Purpose: Invoked from the SmartDataTarget to cancel the creation of a new
row
Notes: Creation of rows and cancellation of rows in the
SmartTempTableAdapter now no longer handled using the AddNew()
method of the BindingSource. We are now creating rows and removing
them on cancel. (Bug 1836)

Top

CancelCreateRowHandler (Object, CancelCreateRowEventArgs)

Purpose: Handler for the CancelCreateRow event of the ProBindingSource.
A Row that has been created using CreateRowHandler gets reverted.
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
args Progress.Data.CancelCreateRowEventArgs
The CancelCreateRowEventArgs with the data for this event
Top

CloseQuery ()

Purpose: Empty the DATASET inside the DataAdapter and reopen Query.
Notes: SUPER:CloseQuery does not have to be invoked because it is an
abstract METHOD.

Top

CreateRecord ()

Purpose: Creates a new record
Notes: Creation of rows and cancellation of rows in the
SmartTempTableAdapter now no longer handled using the AddNew()
method of the BindingSource. We are now creating rows and removing
them on cancel. (Bug 1836)
The OnBeforeCreateRecord event handle are NOT allowed to contain
MESSAGE statements. This will cause the hBuffer of to no longer
point to the right record!

Top

CreateRowHandler (Object, CreateRowEventArgs)

Purpose: Handler for the CreateRow event of the ProBindingSource.
A new Row gets created.
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
args Progress.Data.CreateRowEventArgs
The CreateRowEventArgs with the data for this event
Top

DeleteRow ()

Purpose: Deletes the current record from the EntityTable
Notes: Method enforced by ISmartDataSource

Top

ROWID GetCurrentRowid ()

Purpose: Returns the Current Rowids
Notes: Needs to be a Method instead of a Property Get to return an
indeterminate Array

Returns ROWID
The array of the current query ROWID's
Top

CHARACTER GetFieldValues (character)

Purpose: Returns a CHR(1) delimited list of field values from the
DataSource
Notes: Override to GetFieldValues method. Make sure the Query is properly
positioned before calling SUPER method

Parameters:
pcFields CHARACTER
The comma delimited list of fields to return
Returns CHARACTER
The CHR(1) delimited list of field values
Top

Consultingwerk.ListQueryExpressionByTable GetNewFilterValues ()

Purpose: Builds an empty ListQueryExpressionByTable instance and raises the
CollectFilterValues event
Notes: Will return ? when the event was cancelled by a subscriber

Returns Consultingwerk.ListQueryExpressionByTable
The ListQueryExpressionByTable with the filters per table
Top

CHARACTER MergeQueryStrings (character, ListQueryExpressionByTable)

Purpose: Merges two Query Strings
Notes:

Parameters:
pcFetchQueryString CHARACTER
The first QueryString
poQueryExpressions Consultingwerk.ListQueryExpressionByTable
The List of QueryExpressions by Table to be merged with the first QueryString
Returns CHARACTER
The resulting Query String
Top

OnAfterAssignRecord (AfterAssignRecordEventArgs)

Purpose: Raises the AfterAssignRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.AfterAssignRecordEventArgs
The AfterAssignRecordEventArgs with the data for this event
Top

OnAfterCancelCreateRecord (AfterCancelCreateRecordEventArgs)

Purpose: Raises the AfterCancelCreateRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.AfterCancelCreateRecordEventArgs
The AfterCancelCreateRecordEventArgs with the data for this event
Top

OnAfterCreateRecord (AfterCreateRecordEventArgs)

Purpose: Raises the AfterCreateRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.AfterCreateRecordEventArgs
The AfterCreateRecordEventArgs with the data for this event
Top

OnAfterDeleteRecord (AfterDeleteRecordEventArgs)

Purpose: Raises the AfterDeleteRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.AfterDeleteRecordEventArgs
The AfterDeleteRecordEventArgs with the data for this event
Top

OnAfterUpdateRecord (AfterUpdateRecordEventArgs)

Purpose: Raises the AfterUpdateRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.AfterUpdateRecordEventArgs
The AfterUpdateRecordEventArgs with the data for this event
Top

OnBeforeAssignRecord (BeforeAssignRecordEventArgs)

Purpose: Raise the BeforeAssignRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.BeforeAssignRecordEventArgs
The BeforeAssignRecordEventArgs with the data for this event
Top

OnBeforeCancelCreateRecord (BeforeCancelCreateRecordEventArgs)

Purpose: Raises the BeforeCancelCreateRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.BeforeCancelCreateRecordEventArgs
The BeforeCancelCreateRecordEventArgs with the data for this event
Top

OnBeforeCreateRecord (BeforeCreateRecordEventArgs)

Purpose: Raises the BeforeCreateRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.BeforeCreateRecordEventArgs
The BeforeCreateRecordEventArgs with the data for this event
Top

OnBeforeDeleteRecord (BeforeDeleteRecordEventArgs)

Purpose: Raises the BeforeDeleteRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.BeforeDeleteRecordEventArgs
The BeforeDeleteRecordEventArgs with the data for this event
Top

OnBeforeUpdateRecord (BeforeUpdateRecordEventArgs)

Purpose: Raises the BeforeUpdateRecord event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.BeforeUpdateRecordEventArgs
The BeforeUpdateRecordEventArgs with the data for this event
Top

OnCollectFilterValues (CollectFilterValuesEventArgs)

Purpose: Raises the CollectFilterValues event
Notes:

Parameters:
e Consultingwerk.SmartComponents.Implementation.CollectFilterValuesEventArgs
The CollectFilterValuesEventArgs with the data for this event
Top

PositionChangedHandler (Object, EventArgs)

Purpose: Event handler for the PositionChanged event of the BindingSource
object
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

RefreshData ()

Purpose: Refreshes the current data
Notes:

Top

RepositionCurrentRow ()

Purpose: Repositions the Query to the current row
Notes:

Top

RepositionToRowid (rowid[])

Purpose: Repositions to a Rowid Array
Notes:

Parameters:
prRowid ROWID
The array of ROWID's to reposition the query to
Top

LOGICAL RetrieveData ()

Purpose: RetrieveData reads Data from a Datasource and links the DataHandle
with a BindingSource inside the Instance of
SmartTempTableAdapter.
Notes: If there is no valid instance of a BindingSource a new one is created.
After that a Dataset is cleared and then filled with the requested
data from the Database. Now a Query is build or reopened and the
Handle to this Query is assigned to the BindingSource:Handle.
Enforced by Interface ISmartDataSource
Remember to test if a BindingSource exists. If not call
CreateBindingSource from the base class.

Returns LOGICAL
Logical value indicating the success of the method
Top

SetQuerySort (character)

Purpose: Overridable Setter for QuerySort property
Notes:

Parameters:
arg CHARACTER
The new value for the QuerySort property
Top

UpdateRow ()

Purpose: UpdateRow submits the changes to a buffer into the Database.
Called by SmartViewerControl
Enforced by Interface ISmartDataSource.
Notes: Calls UpdateRow (plAssignFromBindingSource = TRUE) .

Top

UpdateRow (logical)

Purpose: UpdateRow submits the changes to a buffer into the Database.
Called by SmartViewerControl
Notes: Data is updated into the Dataset from the BindingSource. After this
the Datasets changes are submitted to the OERA Backend, merged into
the Dataset and the BindingSource gets refreshed.

Parameters:
plAssignFromBindingSource LOGICAL
Logical value indicating if values should be assigned from the BindingSource


Constructor Detail
Top

SmartTempTableAdapter ()

Purpose: Constructor for the SmartTempTableAdapter class
Notes:

Top

SmartTempTableAdapter (IContainer)

Purpose: Constructor for the SmartTempTableAdapter class
Notes:

Parameters:
poContainer System.ComponentModel.IContainer
An System.ComponentModel.IContainer that represents the container for the component.


Event Detail
Top

AfterAssignRecord (Object, AfterAssignRecordEventArgs)

Purpose: Event raised after a record has been assigned
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterAssignRecordEventArgs
The AfterAssignRecordEventArgs with the data for this event
Top

AfterCancelCreateRecord (Object, AfterCancelCreateRecordEventArgs)

Purpose: Event fired after the creation of a record has been cancelled
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterCancelCreateRecordEventArgs
The AfterCancelCreateRecordEventArgs with the data for this event
Top

AfterCreateRecord (Object, AfterCreateRecordEventArgs)

Purpose: Event fired after a record has been created
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterCreateRecordEventArgs
The AfterCreateRecordEventArgs with the data for this event
Top

AfterDeleteRecord (Object, AfterDeleteRecordEventArgs)

Purpose: Event raised after a record has been deleted
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterDeleteRecordEventArgs
The AfterDeleteRecordEventArgs with the data for this event
Top

AfterUpdateRecord (Object, AfterUpdateRecordEventArgs)

Purpose: Event raised after a record has been updated
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.AfterUpdateRecordEventArgs
The AfterUpdateRecordEventArgs with the data for this event
Top

BeforeAssignRecord (Object, BeforeAssignRecordEventArgs)

Purpose: Event raised before assigning to a record
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.BeforeAssignRecordEventArgs
The BeforeAssignRecordEventArgs with the data for this event
Top

BeforeCancelCreateRecord (Object, BeforeCancelCreateRecordEventArgs)

Purpose: Raised before the creation of the record will be cancelled
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.BeforeCancelCreateRecordEventArgs
The BeforeCancelCreateRecordEventArgs with the data for this event
Top

BeforeCreateRecord (Object, BeforeCreateRecordEventArgs)

Purpose: Event fired before a record will be created
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.BeforeCreateRecordEventArgs
The AfterCreateRecordEventArgs with the data for this event
Top

BeforeDeleteRecord (Object, BeforeDeleteRecordEventArgs)

Purpose: Event raised before a record will be deleted
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.BeforeDeleteRecordEventArgs
The AfterDeleteRecordEventArgs with the data for this event
Top

BeforeUpdateRecord (Object, BeforeUpdateRecordEventArgs)

Purpose: Raised before the a record is updated
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.BeforeUpdateRecordEventArgs
The BeforeUpdateRecordEventArgs with the data for this event
Top

CollectFilterValues (Object, CollectFilterValuesEventArgs)

Purpose: Event raised to collect Filter Values from Filter Sources
Notes: Required by IFilterTarget

Parameters:
sender Progress.Lang.Object
The reference to the object that raised the event
e Consultingwerk.SmartComponents.Implementation.CollectFilterValuesEventArgs
The CollectFilterValuesEventArgs with the data for this event


Property Detail
Top

HANDLE BufferHandle


Returns HANDLE
Top

LOGICAL CreateNewBuffer


Returns LOGICAL
Top

Consultingwerk.ListQueryExpressionByTable FetchFilterValues


Returns Consultingwerk.ListQueryExpressionByTable
Top

LOGICAL FirstTime


Returns LOGICAL
Top

HANDLE QueryHandle


Returns HANDLE
Top

CHARACTER QuerySort


Returns CHARACTER
Top

CHARACTER QueryString


Returns CHARACTER
Top

HANDLE TempTableHandle


Returns HANDLE


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       13.04.2026 10:23:45