C1.Data.2 StringTables this class contains a single static method InitTables that populates the tables used by the Localizer class. SchemaImporter imports database structure into internal DataSet object. After Open(...) you can access database structure using InternalDataSet property Invoke Import() member to actually import database structure into schema object. Formats design-info of the imported tables according to revative position of these tables Summary description for DesignTimeInfo. Base class for all C1DataObjects components. Specifies how a command string is interpreted. These flags, used in property, affect the way change notifications are sent to data bound controls. If none of the flags is set (the default), C1DataObjects uses its regular notification scheme. C1DataObjects uses its regular notification scheme. ListChanged event with ListChangedType = ItemChanged is not fired when a field is set in edit mode (between BeginEdit and EndEdit). ListChanged event with ListChangedType = ItemChanged is fired on EndEdit if some fields were changed while the row was in edit mode. For a newly added row, second ListChanged event with ListChangedType = ItemAdded is called on EndEdit (when the row leaves the "detached" state). The first ListChanged event with ItemAdded is always fired on AddNew:C1DataTable, when the row is created in the "detached" state. SuppressInEditMode | NotifyEndEdit | NotifyAddNewTwice Determines the type of string comparison. String comparisons are compatible with the previous versions of C1DataObjects. String comparisons are compatible with the standard ADO.NET objects, such as DataTable. Compare strings using ordinal sort rules based on the Unicode values of each character. Represents a collection of objects. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Gets the index of the data table with a given name (the name is not case-sensitive). The of the element. The zero-based index of an element, if found; otherwise, -1. Gets the total number of elements in a collection. Gets the element of the collection at the specified index. The zero-based index of the element. Gets the element of the collection at the specified index. The of the element. Gets the element of the collection at the specified index. The of the element. Represents a collection of properties that can be added to , , or . This class does not add any new properties or methods to the System.Data.PropertyCollection class. The only difference with the base class is that C1.Data.PropertyCollection is marked with [Serializable] attribute and implements the ISerializable interface, so it can be passed as a parameter and returned from a method executed remotely in a different process or on a different computer. Initializes a new instance of the PropertyCollection class. C1DataSet is the main client component of C1DataObjects. It contains the data as it is exposed to the user, that can be used both by data bound controls and programmatically. C1DataSet class has a [Serializable] attribute, so it can be passed as a parameter and returned from a method executed remotely in a different process or on a different computer. Base class for . Gets or sets the Form or other Control which has a reference to the BindingContext object. Initializes a new instance of the C1DataSet class. Fills the data set with data fetching it from the database. If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results. Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch. Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set. If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched. Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in event. event fires both on calling Fill and when the data set is filled at startup due to = True. After filling the data set, C1DataObjects fires event. Fills the data set with data fetching it from the database. If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results. Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch. Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set. If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched. Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in event. event fires both on calling Fill and when the data set is filled at startup due to = True. After filling the data set, C1DataObjects fires event. Set this parameter to True if data set schema has changed since the last time the data set was filled. Fills the data set with data fetching it from the database. If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results. Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch. Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set. If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched. Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in event. event fires both on calling Fill and when the data set is filled at startup due to = True. After filling the data set, C1DataObjects fires event. Filter condition restricting the fetched rows of one of the data set table views. Set this parameter to True if data set schema has changed since the last time the data set was filled. Fills the data set with data fetching it from the database. If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results. Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch. Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set. If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched. Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in event. event fires both on calling Fill and when the data set is filled at startup due to = True. After filling the data set, C1DataObjects fires event. Filter conditions restricting the fetched rows of some of the data set table views. Set this parameter to True if data set schema has changed since the last time the data set was filled. Fills the data set with data fetching it from the database. If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results. Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch. Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set. If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched. Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in event. event fires both on calling Fill and when the data set is filled at startup due to = True. After filling the data set, C1DataObjects fires event. Array of names specifying table views to be filled with data. Other table views are not changed. Fills the data set with data fetching it from the database. If data set schema has changed since the last time the data set was filled, you must call one of the Fill overloads with Recreate argument set to True. This recreates the structure of table view and table rowsets in the data set, synchronizing it with the changed schema. Calling Fill without Recreate or Recreate set to False after schema change can cause unpredictable results. Filter conditions specify restrictions on the fetched rows. Each filter condition represents a restriction on one of the data set table views. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by BeforeFill event code implementing the fetch. Specifying the TableViewNames argument allows you to selectively fetch certain table views without affecting other table views in the data set. If the TableViewNames argument is not used, table views with FillIgnore property set to True are not fetched. Before fetching data, C1DataObjects fires BeforeFill event. You can either pass filter conditions to the Fill method or set them in event. event fires both on calling Fill and when the data set is filled at startup due to = True. After filling the data set, C1DataObjects fires event. Filter conditions restricting the fetched rows of some of the data set table views. Array of names specifying table views to be filled with data. Other table views are not changed. Removes all rows from all data set tables. Rows removed by the Clear method do not become deleted (DataRowStateEnum.Deleted), they are completely removed, destroyed. Removes all rows from the specified table views. For = VirtualAutomatic, this property stops the background fetch, if a fetch is in progress. The name of the table view. Updates (commits) all changed data set rows to the database. Update method without parameters updates the whole data set. Update method with tableNames parameter updates only changes in the tables listed in tableNames. The tableNames parameter must contain a list of simple tables (not composite tables or table views). Update method with tableNames parameter does not allow updating a table that is used in a composite table as a main constituent table (is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). If this restriction is not satisfied, the method throws an exception. In such case, always use Update without parameters to update the whole data set. An unsuccessful update, including one resulting in an exception, triggers event. If user code sets the event's Status argument to Continue, an update attempt is made again. This loop continues until either the update succeeds or UpdateError event code does not set Status to Continue. See "Handling Update Errors on the Client" for details. Updates (commits) all changed data set rows to the database. Update method without parameters updates the whole data set. Update method with tableNames parameter updates only changes in the tables listed in tableNames. The tableNames parameter must contain a list of simple tables (not composite tables or table views). Update method with tableNames parameter does not allow updating a table that is used in a composite table as a main constituent table (is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). If this restriction is not satisfied, the method throws an exception. In such case, always use Update without parameters to update the whole data set. An unsuccessful update, including one resulting in an exception, triggers event. If user code sets the event's Status argument to Continue, an update attempt is made again. This loop continues until either the update succeeds or UpdateError event code does not set Status to Continue. See "Handling Update Errors on the Client" for details. Array containing the names of simple tables to be updated to the database. Gets a copy of the data set containing all changes to simple tables made since it was last filled, or since was called. Composite tables and table views are empty in the resulting data set. Gets a copy of the data set containing all changes to simple tables made since it was last filled, or since was called. Composite tables and table views are empty in the resulting data set. Names of the tables whose modified rows are to be included in the resulting data set. If this argument is null, modified rows of all tables are included. One or more (combination of) flags Added, Modified, Deleted indicating what rows to include. Merges the parameter data set containing only simple table data into this (caller) data set. This method copies the data contained in the dataSet argument to the calling C1DataSet. It is used to refresh a data set after its modified rows are updated to the database in a business method, see "Business Methods". The normal sequence is to obtain a data set with the method, pass it to the business method, return the passed data set back from the business method and call Merge for the original data set with the returned data set as the parameter. The dataSet argument object must contain only simple table rows. If one of its table views or composite tables is not empty, this method throws an exception. For example, see CustomFillUpdate sample. The dataSet that will be merged into the calling data set. Commits all changes made to the data set since it was filled with data or the last time or was called. After this method the current state of all data set rows except deleted rows becomes also their original state. Any objects still in edit mode successfully end their edits. The property of each changes: Added and Modified rows become Unchanged, and Deleted rows are removed. can also be called for a single simple table. Rolls back all changes made to the data set since it was filled with data or the last time or was called. This method returns all data set rows to their original state. When the RejectChanges method is called, any rows still in edit mode successfully cancel their edits. New rows are removed. Modified and deleted rows return back to their original state (See ). can also be called for a single simple table. Gets a value indicating whether the data set has changes, including new, deleted, or modified rows, optionally filtered by . You can examine HasChanges before calling method. Gets a value indicating whether the data set has changes, including new, deleted, or modified rows, optionally filtered by . You can examine HasChanges before calling method. One of the DataRowStateEnum values. Sets the execution mode affecting actions invoked while handling another action. When method is called, it restores the last mode that existed before PushExecutionMode call. PushExecutionMode and are the push/pop operations of a stack. One of the values. Restores the execution mode affecting actions invoked while handling another action. When PopExecutionMode method is called, it restores the last mode that existed before call. and PopExecutionMode are the push/pop operations of a stack. Writes XML data from the data set. The WriteXml method is used to save the data in an XML form so it can be later restored with . Together, these methods allow to save the whole data contents of a and restore it later, for example, to save work when no database connection is available to save it in the database, and restore it and send to the database for update when the connection becomes available. The file name (including the path) to which to write. Writes XML data from the data set. The WriteXml method is used to save the data in an XML form so it can be later restored with . Together, these methods allow to save the whole data contents of a and restore it later, for example, to save work when no database connection is available to save it in the database, and restore it and send to the database for update when the connection becomes available. The stream to which to write. Writes XML data from the data set. The WriteXml method is used to save the data in an XML form so it can be later restored with . Together, these methods allow to save the whole data contents of a and restore it later, for example, to save work when no database connection is available to save it in the database, and restore it and send to the database for update when the connection becomes available. The XmlReader to which to write. Reads XML data into the data set. The ReadXml method is used to restore the data previously saved by . Together, these methods allow to save the whole data contents of a and restore it later, for example, to save work when no database connection is available to save it in the database, and restore it and send to the database for update when the connection becomes available. The file name (including the path) from which to read. Reads XML data into the data set. The ReadXml method is used to restore the data previously saved by . Together, these methods allow to save the whole data contents of a and restore it later, for example, to save work when no database connection is available to save it in the database, and restore it and send to the database for update when the connection becomes available. The stream from which to read. Reads XML data into the data set. The ReadXml method is used to restore the data previously saved by . Together, these methods allow to save the whole data contents of a and restore it later, for example, to save work when no database connection is available to save it in the database, and restore it and send to the database for update when the connection becomes available. The XmlReader which to read. Creates and fills with data an ADO.NET data set consisting of this data set's table views. This method can be used to export data and to integrate C1DataObjects with reporters, such as CrystalReports. It returns an ADO.NET DataSet containing a table for each table view in the C1DataObjects data set definition, and a relation for each view relation. Creates and fills with data an ADO.NET data set consisting of this data set's table views. This method can be used to export data and to integrate C1DataObjects with reporters, such as CrystalReports. It returns an ADO.NET DataSet containing a table for each table view in the C1DataObjects data set definition, and a relation for each view relation. If True, System.Data.DataSet is created and returned with schema information but without data rows. Begins the process of modifying/synchronizing the underlying ADO.NET DataSet. The process of modifying/synchronizing the underlying ADO.NET DataSet, see Working with ADO.NET Dataset, consists of two stages: First stage (between and ) is for modifying the ADO.NET data set C1DataSet.StorageDataSet by any means available in ADO.NET. Simple tables are filled with rows or modified at this stage. Second stage (between and ) is for synchronizing the with changed underlying data. Table views are filled with rows on this stage, using the method. Marks the end of the first stage of modifying/synchronizing the underlying ADO.NET DataSet. The process of modifying/synchronizing the underlying ADO.NET DataSet consists of two stages: First stage (between and StorageChanged) is for modifying the ADO.NET data set by any means available in ADO.NET. Simple tables are filled with rows or modified at this stage. Second stage (between StorageChanged and ) is for synchronizing the with changed underlying data. Table views are filled with rows on this stage, using the method. StorageChanged call is required between and , to mark the end of the first stage and the beginning of the second. Calling StorageChanged with clearTableViews=False allows to make simple changes to without modifying table view rows. For example, you might want to change some field values in the underlying ADO.NET data set, and you are sure that this will not affect table view rows in any way, that is, all table view rows will still point to the same table rows, only data in the table rows will change. In such case, you can use clearTableViews=False and skip the second stage (synchronization). But this must be done with caution, because C1DataObjects does not verify these conditions. If, for example, you delete a table row that was pointed to by a table view row, it will cause unpredictable behavior. Also, using clearTableViews=False means that the collection of table view rows will not change, so any rows added to the ADO.NET data set will not be reflected in the table views. Marks the end of the first stage of modifying/synchronizing the underlying ADO.NET DataSet. The process of modifying/synchronizing the underlying ADO.NET DataSet consists of two stages: First stage (between and StorageChanged) is for modifying the ADO.NET data set by any means available in ADO.NET. Simple tables are filled with rows or modified at this stage. Second stage (between StorageChanged and ) is for synchronizing the with changed underlying data. Table views are filled with rows on this stage, using the method. StorageChanged call is required between and , to mark the end of the first stage and the beginning of the second. Calling StorageChanged with clearTableViews=False allows to make simple changes to without modifying table view rows. For example, you might want to change some field values in the underlying ADO.NET data set, and you are sure that this will not affect table view rows in any way, that is, all table view rows will still point to the same table rows, only data in the table rows will change. In such case, you can use clearTableViews=False and skip the second stage (synchronization). But this must be done with caution, because C1DataObjects does not verify these conditions. If, for example, you delete a table row that was pointed to by a table view row, it will cause unpredictable behavior. Also, using clearTableViews=False means that the collection of table view rows will not change, so any rows added to the ADO.NET data set will not be reflected in the table views. Whether to clear all table view rows or not. This parameter is True by default, meaning that table views are cleared at the end of the first stage. Returns the list of all potential table view rows, pointers to all existing table rows. This method can be used only on the second stage of ADO.NET data set modification/synchronization process, see Working with ADO.NET Dataset. This method returns a list that can be passed as a parameter to . If you pass it unchanged, the table view will contain all existing table rows, unrestricted. Filtering this list, building another list from its elements, you can restrict (filter) the table view. Elements of the returned ArrayList are: For a table view based on a simple table: objects, rows of the corresponding table. For a table view based on a composite table: arrays of type [], with length equal to the number of "main" simple tables in the composite table ("main" means connected to its parent with a 1-M relation, not with an M-1 one). That is, every element of the list is an array of table rows, one for each "main" constituent table. A composite table can also contain "linked" constituent tables (connected to their parents with M-1 relations). Since "linked" rows can be uniquely located given the values in "main" rows, they are not used here. The name of the table view for which to return the list of potential rows. Fills a table view with rows pointing to table rows. This method fills a table view with rows. It can be used only on the second stage of ADO.NET data set modification/synchronization process, see Working with ADO.NET Dataset. The rows are passed in as the tableRows collection. Elements of this collection are pointers to table rows: For a table view based on a simple table: objects, rows of the corresponding table. For a table view based on a composite table: arrays of type [], with length equal to the number of "main" simple tables in the composite table ("main" means connected to its parent with a 1-M relation, not with an M-1 one). That is, every element of the list is an array of table rows, one for each "main" constituent table. A composite table can also contain "linked" constituent tables (connected to their parents with M-1 relations). Since "linked" rows can be uniquely located given the values in "main" rows, they are not used here. The input collection of rows can be obtained by one of the two methods. First is to call and optionally filter the returned list according to some filtering criteria. This method is convenient, but may be performance-heavy for composite tables where uses unrestricted joined tables that sometimes can produce a large number of rows, because no conditions are checked except the join conditions of the 1-M relations forming the composite table. The alternative method is to scan rows of constituent tables in nested loops, without calling . In this case you have more control on which rows you examine and which rows you skip, that in some cases can lead to better performance. After table view rows are created, they are sorted according to the fillSort argument. The sort syntax is the same as in the . property, for example, "CustomerID, OrderDate DESC" (DESC means descending order). If fillSort is empty, the value of . property is used for sorting. If that is empty, the rows are sorted by primary key. The name of the table view to fill with rows. The list of pointers to table rows. Optional sort to apply to the table view row collection. Ends the process of modifying/synchronizing the underlying ADO.NET DataSet. Related topics: Method, Method. Fired before the data set fills with data. This event is fired on the client before calling the server to fill the data set with data. It is fired both when Fill is called and when the data set is filled at startup due to = True. In this event, you can add filter conditions to Filter before passing the request on to the server. Fired after the data set is filled with data. This event is fired on the client after the data set is filled with data. It is fired both when is called and when the data set is filled at startup due to = True. In this event, you can modify the data set after it has been filled with data fetched from the server. Fired when one of the data set data members changes current row position. Current row position is managed by the form containing the data set component. Each DataMember has its own current row position that is managed by a System.Windows.Forms.CurrencyManager object attached to it by the form. Data bound controls interact with CurrencyManager to synchronize with current row position and request moving to a new row position. Whenever current row position changes for any of the data set data members, the PositionChanged event fires. It allows you to associate business logic with changes in current row position. Fired when there are changes in the current row, whatever their cause, resulting from field change, current row change or complete data refresh. The CurrentRowChanged event is useful in scenarios like synchronizing detail data with the master row on every change occurring in the master row. The CurrentRowChanged event is triggered in two main cases: 1. When row currency changes, another row becomes current, or the whole rowset is refreshed. In this case, event argument property ChangeType is set to RowChangedTypeEnum.CurrentRowChanged. 2. When the value of a field (or several fields) in the current row is changed. In this case, event argument property ChangeType is set to RowChangedTypeEnum.FieldsChanged. Fired when an error occurs committing changes to the dataset. An unsuccessful update, including one resulting in an exception, triggers UpdateError event. If user code sets the event's Status argument to Continue, an update attempt is made again. This loop continues until either the update succeeds or UpdateError event code does not set Status to Continue. See Handling Update Errors on the Client for details. If the error is a fatal failure (a program or physical error, see Handling Errors in Update), the Error argument contains the exception object describing the failure. If this is a concurrency conflict that could not be reconciled on the server (see Handling Concurrency Conflicts), the Error argument is set to null (Nothing in Visual Basic). In case of a concurrency conflict, the rows that failed update can be found in the DataSet using the properties , and . Fired when an error occurs. This event gives developers full control over error (exception) handling. It allows to customize/localize error messages or provide a fully customized error handling if necessary. When this event is fired, the Status argument is set either to ErrorsOccured or to Continue. It is set to ErrorsOccured if the error occurred during an action executed from code, and to Continue if it occurred performing an action requested by data bound controls. What happens next, whether the error is considered handled or throws an exception, depends on the value you assign to the Status argument: 1. If you set Status to ErrorsOccured, an exception is thrown. To specify the exception information, set the Error argument. Use this option in cases where you do not need to override the standard exception handling. 2. If you set Status to Skip, the error is considered handled and operation resumes as if the error has not occurred (but subsequent actions may not be executed when they depend on the successful completion of the current action). Use this option when you want to handle the error in your code, suppress the standard error handling and consider the operation successful. 3. If you set Status to Continue, C1DataObjects shows a standard error message box and resumes operation without throwing an exception (as in the Skip case). Use this option when you are satisfied with the standard C1DataObjects error message and want to consider the operation successful. 4. It is also possible that you need to show a custom error message or otherwise handle the error in the Error event, then throw an exception, but do not want data bound controls to show their own error messages because you have already shown an error message. To accomplish that, set Status to ErrorsOccured and throw an exception derived from with ShowMessage property set to False. Note that this behavior is only supported by data bound controls honoring the ShowMessage property, such as ComponentOne FlexGrid and C1TrueDBGrid. Gets or sets the name of the data set in the schema. This property determines the schema data set definition represented by this data set. Gets or sets a value indicating whether the data set will be automatically filled with data when a data bound control requests data from it. If this property is set to True (default), the data set is automatically filled with data at startup, once a control bound to it requests data. If it is set to False, the data set remains empty until the method is called. Gets a value indicating whether the data set is filled with data. This run-time read-only property returns True if the data set has already been filled with data, either by the or, if the property was set to True, by a request from a data bound control. Gets or sets the name of the data library containing the schema. In a client application using a data library, this property determines the name of the data library containing the schema for this data set. It is the name of a data library assembly included in the project References. The name does not include the ".dll" extension. In a 3-tier client application, this property gets or sets the URL of the data library located on the server. In a 3-tier application, data library runs both on the server and on the client. The DataLibrary property identifies the data library on the client. The DataLibraryUrl property identifies data library on the server. Using this URL, client-side data library invokes the data library on the server. Returns or sets the component hosting the schema on which the data set is based. This property determines the C1SchemaDef component to which the data set is connected. In direct client applications, this property is usually set at design time to a component residing in the same form. In a client application using a data library, this property is left empty. The is retrieved from the data library. Schema Objects Application configurations Returns the object representing the schema on which the data set is based. Returns the container object hosting the component in the data library. This run-time property returns the collection of tables in the data set. Schema Objects This run-time property returns the collection of table views in the data set. Schema Objects Gets the ADO.NET DataSet where table data rows are stored. Working with ADO.NET Dataset C1DataObjects and ADO.NET Gets a value indicating whether actions in handling a business logic event are deferred or performed immediately. This property affects how C1DataObjects performs actions while inside a business logic event. If this run-time property is set to Immediate (default), actions are performed immediately. If it is set to Deferred, actions are deferred until the current user action handling is completed. This property is read-only. To set execution mode, call the method, passing it the new mode as a parameter. To restore the previous execution mode, call the method. Action Order and Execution Mode C1ExpressConnection Class Gets or sets a value indicating whether relation constraints must be satisfied while modifying the data set. This run-time property is set to True by default, which means that C1DataObjects enforces relation parent-child constraints when the data set is modified. Relation constraints are imposed by simple relations with property set to True. They do not allow child records without parent. Simple Relations C1ExpressConnection Class Gets or sets a value indicating whether firing event is deferred. This property, available only at run time, is set to False by default. Setting it to True, defers firing AfterChanges event until this property is set back to False. Normally, event is fired after every change to a field value. Sometimes, it is desirable to make multiple field changes in a batch without firing this event, and fire the event only when all changes are done. Setting ChangeInProgress to True enables this mode of firing for all rows of the data set. C1ExpressConnection Class Gets or sets a value indicating whether data bound controls must be notified of changes in the data set. This run-time property is set to True by default, which means that data bound controls receive notifications of any change made to the data set. Notifications are issued by C1DataObjects after every end-user or programmatic action causing changes in the data set. C1DataObjects issues notifications when the action is completely handled. Having received a change notification, data bound controls usually repaint themselves to reflect the changed data. In some cases, it is necessary to suppress notifications to be able to perform multiple actions in a batch without causing changes in data bound controls. Setting the SuppressNotifications property to False disables sending notifications to data bound controls. If you suppress notifications, data bound controls will not be notified of any changes, so you have to explicitly call for all changed table views to make data bound controls refresh their contents. Flags affecting the way change notifications are sent to data bound controls. For data bound controls that rely on specific ADO.NET notification behavior, set NotificationMode=ListChangedFlags.Ado.Net. C1DataObjects uses a slightly different notification scheme (calling the IBindingList.ListChanged event) than ADO.NET does. C1DataObjects notifications are fully .NET data binding-compliant and optimized for data bound controls. All ComponentOne bound controls and Microsoft bound controls work properly with this notification scheme. However, some (very few) third-party bound controls may not work properly unless notifications are fully ADO.NET compliant. In fact, all data bound controls should work with C1DataObjects notifications without problems, but in the non-ideal world that can be broken. To prevent this problem and allow using any bound controls, C1DataObjects provides this property. If you need this property in C1DataExpress, set C1ExpressConnection.DataSet.NotificationModeFlags or .ExpressConnection.DataSet.NotificationModeFlags in code, at run time. The notifications can be turned off altogether using the property. Determines the locale information used in string comparisons within the data set. This property affects string comparison in expression evaluation, sorting table views by the end user (via IBindingList.ApplySort) and sorting in objects. By default, all objects created by a C1DataSet use the Locale property of the C1DataSet, but it can be overridden setting the property of the object. C1DataObjects Expressions Determines whether string comparisons within the data set are case-sensitive. This property affects string comparison in expression evaluation, sorting table views by the end user (via IBindingList.ApplySort) and sorting in objects. By default, all objects created by a C1DataSet use the CaseSensitive property of the C1DataSet, but it can be overridden setting the property of the object. Determines the type of string comparison within the data set. This property affects string comparison in expression evaluation, sorting table views by the end user (via IBindingList.ApplySort) and sorting in objects. By default, all objects created by a C1DataSet use the SortComparisonMode property of the C1DataSet, but it can be overridden setting the property of the object. Gets a collection of custom user information associated with the data set. Gets a value indicating whether there are errors in any of the rows in any of the tables of this data set. You can use the HasErrors property of the data set to determine if any table has errors, before checking individual objects in the collection. To get all errors of an individual , use its method. Gets a collection of Connection objects used at run time as substitutes for schema connections. This property changes connection at run time for a single data set. If you need to change schema connection for all data sets at once, set Connection.ConnectionString in the CreateSchema event. By default, if C1DataSet.DynamicConnections is empty, data fetch and update for this data set uses the connections specified in the schema. Add a connection object for each connection you want to change at run time for this data set. Usually, you will add a copy of a schema connection object(s) using . Alternatively, you can create new connection objects from scratch, for example, new (). Adding an existing connection object from schema to DynamicConnections throws an exception. This prevents changes unintentionally affecting other data sets attached to the same schema. Having added a connection object, set its properties as desired. Usually, only the needs to be changed in connection objects obtained with . If you created a new connection object, without using , set its property to the name of the schema connection you want to modify. When the data set performs a fetch or update operation while its DynamicConnections collection is not empty, it first looks for connection properties in DynamicConnection, and only then, if not found, in the schema. If DynamicConnections contains a connection with the same as the schema connection, that DynamicConnections element is used instead of the schema connection. Database Connections Gets or sets username, password and domain used to communicate with the server. Gets the RemoteDataService-derived class of the data library. This property enables the programmer to access the RemoteDataService-derived class in the data library, both in 2-tier and 3-tier configuration. This property is necessary for calling business methods (methods added by the programmer to the RemoteDataService-derived class in the data library). For example, see the CustomFillUpdate sample. C1DataView is used for sorting and filtering data. Data bound controls can bind directly to a C1DataView component, see Using a Data Library. This allows you to use C1DataView to provide separate views into the same data, with different row filter criteria and sorts. Each such view has independent current row, can be independently navigated. Another common use of C1DataView is to obtain direct access to simple table data rows. Normal data binding, using or gives you access to table views. If, for some reason, you need direct access to simple tables behind those table views, you need to use C1DataView with non-empty property. See How to Access Table Data for details. Base class for , and C1DataExpress components. Base class for , and C1DataExpress components. Fired when controls bound to this component change their current row position. Current row position is managed by the form containing this component, by its CurrencyManager object. Data bound controls interact with CurrencyManager to synchronize with current row position and request moving to a new row position. Whenever current row position changes, the PositionChanged event fires. It allows you to associate business logic with changes in current row position. C1ExpressTable Class Fired when there are changes in the current row, whatever their cause, resulting from field change, current row change or complete data refresh. The CurrentRowChanged event is useful in scenarios like synchronizing detail data with the master row on every change occurring in the master row. The CurrentRowChanged event is triggered in two main cases: 1. When row currency changes, another row becomes current, or the whole rowset is refreshed. In this case, event argument property ChangeType is set to .CurrentRowChanged. 2. When the value of a field (or several fields) in the current row is changed. In this case, event argument property ChangeType is set to .FieldsChanged. Gets or sets the current row position for controls bound to this component. This property gets or sets the Position property of the CurrencyManager (class System.Windows.Forms.CurrencyManager) controlling current row position for controls bound to the component. C1ExpressTable Class Gets the source containing the data. The data table returned by this property is used for programmatic access to the table data. C1ExpressTable Class Initializes a new instance of the C1DataView class. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Returns the zero-based index of a given row in the collection. The row to locate in the collection. The zero-based index of the row, if found; otherwise, -1. Determines whether an element is in the collection. The row to locate in the collection. True if row is found in the collection; otherwise, False. Creates and returns a object containing child rows of a parent row. The data set to which the parent row and the child view belong. The name of the view relation () between the parent and the child. The parent row. This method can be used as an alternative to for master-detail navigation. For example, you might want to use the resulting as a data source for a data bound control. Refreshes the collection of data view rows. This method re-populates the data view rows, testing the filter conditions and applying sort, if specified. Call this method after changing filter conditions and sort, if is set to False. Refreshes the collection of data view rows. This method re-populates the data view rows, testing the filter conditions and applying sort, if specified. Call this method after changing filter conditions and sort, if is set to False. If the thisViewOnly argument is True, only this C1DataView is refreshed. If it is False (default), all C1DataView components based on the same table view are refreshed. Adds a new row to the data view. This method creates a new empty row and adds it to the source data table of the data view. The new row is filled only with default values, so it may not satisfy the filter conditions if some are set in the property. However, even if this new row does not satisfy filter conditions, it is always included in the data view until is called, at which time the row is tested for filter conditions and either remains in the data view or not depending on the filter condition. Adding Rows and Primary Keys Deletes a row from the source table view or table. After this method, the row is deleted from the source, from the data view and from all other data views based on that source. The index of the row to delete. This is an index in the data view, not in the source table view or table. Finds a row in the data view by the specified sort key value. This method applies only to sorted view, with a non-empty . It returns the index of the first row in the data view containing the specified sort key value(s). If no such rows are found, it returns a negative number, which is the bitwise complement of the index of the row whose sort key is next to the specified sort key value. The value to search for. Finds a row in the data view by the specified sort key value. This method applies only to sorted view, with a non-empty . It returns the index of the first row in the data view containing the specified sort key value(s). If no such rows are found, it returns a negative number, which is the bitwise complement of the index of the row whose sort key is next to the specified sort key value. An array of values to search for. Used to programmatically specify the list of rows in a data view. This event can be used to create custom data views in cases where filtering cannot be specified by a simple expression in the property or sorting by a list of fields in the property. The GetRows event is called every time C1DataObjects needs to obtain the list of rows for the data view. It gives the developer an opportunity to specify a list of rows comprising the data view by assigning such list to the e.List event argument. This list can be filtered and sorted in whatever fashion the developer needs it to be, provided it consists of C1DataRow objects belonging to the table view or table on which the data view is based. The list supplied in the event handler will become exactly the list of rows of this data view, unless and/or properties are not empty, in which case they are applied to the list of rows resulting from the GetRows event. Writing code in GetRows event, you can use the e.List argument value passed to the event, which is the complete list of rows as it would appear in the data view if there were no GetRows handler and no and properties. You can filter and/or sort this list to obtain your custom list, although this is only one possible technique, you can form the resulting list in any other way you need. Gets the data set object to which the data view belongs. This property returns the data set containing this data view's . Gets or sets the name of the source table view for this data view. Only one of the two properties, or TableViewName can be set to a non-empty string. Gets or sets the name of the source table for this data view. Only one of the two properties, TableName or can be set to a non-empty string. Gets the schema used in the data view, if the property is set. Only one of the two properties, or can be set to a non-empty string. Gets the schema used in the data view, if the property is set. Only one of the two properties, or can be set to a non-empty string. Gets or sets a value indicating whether this component's and settings are applied to any binding to the table view in the data set. This property is False by default, meaning that filtering and sorting affect only the data exposed by this C1DataView component. Binding to a directly or to another is not affected by this view's filtering and sorting. If this property is set to True, filtering and sorting affect the underlying table view data directly. So, all controls bound to that table view, in C1DataSet or in , are filtered and sorted (including parent-child rows in master-detail). See the DefaultDataView sample in the Samples directory. Only and properties affect table view data, other properties of do not affect the whole table view. IsDefault = True can be used only with a attached to a table view ( specified), it cannot be used with a data view attached to a table ( specified). Gets the component with IsDefault = True, if one is connected to this data view. Gets or sets the expression used to filter rows in the data view. Expression must return Boolean values. If it evaluates to True on a row, the row is included in the data view. If it evaluates to false, the row is excluded. For example, expression "City = 'London'" selects all rows where field City equals 'London'. To select rows with null values in a certain field, use the following expression: "IsNull(Field1, 'Null Field') = 'Null Field" C1DataObjects Expressions Gets or sets the row state filter used in the data view. Using this property you can select only added rows, or only deleted rows, or only modified rows, or a combination of those states, see . Using the Deleted row state filter is only allowed for simple tables ( property is set), it is not allowed for table views ( property is set). Gets or sets the sort field or fields, and sort order for the data view. A string containing one or more field names followed by "ASC" (ascending; default, can be omitted) or "DESC" (descending). Multiple fields are separated by commas. Examples: "OrderID", "CustomerID DESC", "Quantity DESC, CustomerID". Gets the data table object which is the source of this data view. Gets or sets a value indicating whether the data view is automatically refreshed when one of the following properties changes: , , , , . This property is True by default. If it is set to False, changing any of the properties at run time does not automatically refresh the data view, refresh occurs when the method is called. Gets or sets a value indicating whether changes to the rows of this data view are allowed. If the or on which the data view is based has = False, changing rows is not allowed regardless of the value of data view's ReadOnly property. Gets or sets a value indicating whether adding new rows to this data view is allowed. If the or on which the data view is based has AllowAddNew = False, adding new rows is not allowed regardless of the value of data view's AllowAddNew property. Gets or sets a value indicating whether deleting rows from this data view is allowed. If the or on which the data view is based has AllowDelete = False, deleting rows is not allowed regardless of the value of data view's AllowDelete property. Gets the total number of rows in the data view. This property returns the number of rows satisfying the conditions in and . Gets the row at the specified index in the data view. This property returns the rows satisfying the conditions in and . The zero-based index of the row. Where the instance of a data library is running. Application Configurations Direct client: there is no data library, no server, database access is performed in the same application, and components belong to the same container class or form. Data library runs on the client in a 2-tier configuration. Data library runs on the server in a 3-tier configuration. Data library runs on the client in a 3-tier configuration. component is used in a WebForms (ASP.NET) application. Flags affecting generated classes in the data objects assembly (*.DataObjects.dll). Used in the property. All generated classes belong to a single namespace, no static name fields are generated. Generated table view classes belong to special namespaces, a namespace for each data set. Enables generating static string properties returning field, table, table view and relation names, to be used in code instead of constant strings, to prevent errors in naming objects. DataSetNamespaces | StaticNameFields The SchemaBase class is a common base class from which and component classes are derived. Returns or sets the Schema object. This property is overridden in and to return the component's schema. C1SchemaRef components are used in a data library with multiple source code files. A C1SchemaRef component represents the component holding the library's schema when it resides in a different file in the project. Creating a Data Library Project Initializes a new instance of the C1SchemaRef class. Returns or sets the name of the component referred to by this component. This property determines the component referred to by this component. In addition to setting this property, you must call the method at run time. Schema Objects Returns the object of the corresponding component. The C1SchemaDef component hosts a Schema object that is the basis of a C1DataObjects data library or direct client. The object associated with a C1SchemaDef component is created and edited using the Schema Designer invoked from the context menu of a C1SchemaDef component. A C1DataObjects data library always contains a single schema, that is, a single C1SchemaDef component. An application that uses C1DataObjects directly, without a data library (Direct Client) is allowed to have multiple schemas, each stored in its own C1SchemaDef component. Schema Objects Application Configurations Initializes a new instance of the C1SchemaDef class. Adds an element to the list of components associated with the C1SchemaDef component. This method is used to specify a list of components representing (associated with) a C1SchemaDef component. It is useful in large data library projects where it is desirable to use multiple source code files to write business logic code. A component represents the C1SchemaDef component holding the library's schema when it resides in a different file in the project. Every component representing a C1SchemaDef must have its SchemaDef property set to the C1SchemaDef component and it also has to be associated with the C1SchemaDef component at run time calling the Add method. Creating a Data Library Project Fired after the object has been created at startup. In most cases, a schema is created at design time in the Schema Designer, and used at run time without modifications. However, all schema objects are programmatically accessible at run time through the schema object model, with the class being the root of that object model. Using this object model, it is possible to modify the schema or even define it from scratch at run time, using the CreateSchema event. To access and modify the Schema object, use the property. In a 3-Tier Application, this event is called both for the client and server instances of the data library. If you modify schema in this event, you may need to know whether it occurs on the client or on the server, for example, to modify database connections differently depending on where the event occurs. This information can be obtained from the RunsAt property. Schema Objects Returns or sets the object. Normally, this property is not set by user code. It is set by C1DataObjects SchemaDesigner. User code gets the value of this property to gain access to schema objects and possibly modify them at run time, in the event. Schema Objects This property is used in ComponentOne WebDataObjects for data caching in web applications. It is ignored if the schema is used in WinForms application or in WebForms application without WebDataObjects. Flags affecting generated classes in the data objects assembly (*.DataObjects.dll). This property affects the way classes are generated in the data objects assembly, that is, the *.DataObjects.dll assembly automatically generated on saving schema, see Schema Objects. Setting flag .DataSetNamespaces makes table view classes belong to special namespaces, a namespace for each data set, for example, Northwind.DataObjects.CustOrders.EmployeesRow for table view Employees in data set CustOrders. Table classes still belong to the root namespace: Northwind.DataObjects.EmployeesRow for table Employees. Setting flag .StaticNameFields generates static string properties returning field, table, table view and relation names, so that they can be used instead of constant strings in code thus making it compile-time safe (errors detected at compile time), for example: Northwind.DataObjects.EmployeesRow.FieldNameEmployeeID (field name returning "EmployeeID" for field EmployeeID of table Employees), Northwind.DataObjects.EmployeesRow.TableName (table name returning "Employees", for table Employees), Northwind.DataObjects.EmployeesRow.RelationNameEmployees__Orders (relation name returning "Employees - Orders", for simple relation "Employees - Orders"), Northwind.DataObjects.CustOrders.EmployeesRow.TableViewName (table view name returning "Employees", for table view Employees in data set CustOrders), Northwind.DataObjects.CustOrders.EmployeesRow.FieldNameEmployeeID (field name returning "EmployeeID" for field EmployeeID of table Employees), Northwind.DataObjects.CustOrders.CustOrdersRow.RelationNameCO__ODP (relation name returning "CO - ODP", for view relation "CO - ODP" between table views CustOrders and OrderDetailsProducts in data set CustOrders). Returns a value indicating where the instance of the data library is running. The main purpose of this property is to distinguish between .ThreeTierServer and .ThreeTierClient. This is sometimes necessary in business logic to take different actions depending on whether it runs in the client-side or in the server-side instance of a data library. For example, you might want to assign a in event on the server, but leave empty on the client in a 3-tier configuration, since the client does not perform database access. Application Configurations The SessionCacheProperties class is used in ComponentOne WebDataObjects to specify settings for session cache. It is not used in WinForms application or in WebForms application without WebDataObjects. Gets or sets the cache storage used by default in session cache methods. Gets or sets a value indicating whether the data in cache should be compressed. Get or sets the path to cache temporary files. Represents a row of data in a object. Gets the object associated with a row object (data item) obtained from data binding. An object exposed by a C1DataObjects data source to bound controls. This method allows programmers to obtain the object corresponding to an object returned by a C1DataObjects data source, from its IList interface (used in data binding). For example, such objects belong to a CurrencyManager.List collection, and CurrencyManager.Current returns one of them. Objects obtained by bound controls from a C1DataObjects data source are not C1DataRow objects, although each of them corresponds to a object. The FromDataItem method represents this correspondence. Bound controls can get all information they need from the objects returned by the IList interface. However, if you want to work with such objects (data items) in code, get or set their field values, you need to treat them as objects. This method allows you to obtain a from an untyped row object (data item) returned by the IList interface. For example, C1WebGrid (bound grid control in ComponentOne Studio for ASP.NET) has a C1GridItem.DataItem property. This property returns an object obtained by the grid from the data source. It is not a C1DataRow object, so you must use C1DataRow.FromDataItem(C1GridItem.DataItem) to obtain the C1DataRow object corresponding to that data item. Returns object. Gets a value indicating whether a specified row version exists. One of the values. True if the version exists; otherwise, False. Begins an edit operation on the row. Use the BeginEdit method to put a C1DataRow into edit mode. In this mode, validation is temporarily suspended allowing the user to make changes to more than one field in more than one row. The BeginEdit method is called implicitly when the user positions to a row in a data-bound control; the EndEdit method is called implicitly when you invoke or methods. While in edit mode, the stores representations of the current and new proposed values Therefore, as long as the EndEdit method has not been called, you can retrieve either the current or proposed version by passing either DataRowVersionEnum.Current or DataRowVersionEnum.Proposed for the Version parameter of the Item property. You can also cancel any edits by invoking the CancelEdit method. To see if the row is in edit mode, call the HasVersion method with DataRowVersionEnum.Proposed. Ends the edit on the row. See for details. Cancels the current edit on the row. See for details. Deletes the row. If the of the row is Added, the row is removed from the data table. The becomes Deleted after calling the method. Deleted rows can be undeleted by calling . Commits all the changes made to the row since the last time AcceptChanges or RejectChanges was called. This method can be applied only to simple table rows (or to rows of a table view based on such table). It cannot be applied to composite table rows. Also, applying this method to a simple table that is used in a composite table as a main constituent table is not allowed (if it is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). In such cases, use for the whole data set. If one of these restrictions is not satisfied, the method throws an exception. Rolls back all the changes made to the row since the last time AcceptChanges or RejectChanges was called. This method can be applied only to simple table rows (or to rows of a table view based on such table). It cannot be applied to composite table rows. Also, it is not allowed to apply this method to a simple table that is used in a composite table as a main constituent table (is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). In such case, use for the whole data set. If one of these restrictions is not satisfied, the method throws an exception. Refreshes field values in the row. This method performs for every field that has non-empty collection. Normally, calculations are performed automatically, without explicit Refresh call, when calculation arguments change. However, some calculation arguments changes cannot be detected automatically, for example, changes in Current, Original or BeforeChange field values, see C1DataObjects Expressions. Gets the parent row of this C1DataRow using the specified relation. The overload without parameters can be used when the parent and the child are connected with a single relation. The name of the relation to use. An object (or null). Gets the parent row of this C1DataRow using the specified relation. The overload without parameters can be used when the parent and the child are connected with a single relation. An object (or null). Gets the child rows of this C1DataRow using the specified relation. The overload without parameters can be used when the parent and the child are connected with a single relation. The name of the relation to use. An array of objects (or a zero-length array). Gets the child rows of this C1DataRow using the specified relation. The overload without parameters can be used when the parent and the child are connected with a single relation. An array of objects (or a zero-length array). Gets a value indicating whether the specified field contains a null value in this row. The zero-based index of the field. Gets a value indicating whether the specified field contains a null value in this row. The name of the field. Sets the value of the specified field to null. A data field. Clears the errors for the row, including the and errors set with . See for details. Gets an array of fields that have errors in this row. See for details. Gets the error description for a field. The index of a field. See for details. Gets the error description for a field. The name of a field. See for details. Gets the error description for a field. The field in error. See for details. Sets the error description for a field in the row. The index of a field. The error description. See for details. Sets the error description for a field in the row. The name of a field. The error description. See for details. Sets the error description for a field in the row. A data field. The error description. See for details. Changes from Unchanged to Modified without modifying any field in the row. Gets the to which the row belongs. Gets or sets the data stored in the row in one of the fields. The zero-based index of the field. An Object that contains the data. Gets or sets the data stored in the row in one of the fields. The name of the field. An Object that contains the data. Gets or sets the data stored in the row in one of the fields. The data field that contains the data. An Object that contains the data. Gets or sets the data stored in the row in one of the fields. The data field that contains the data. One of the DataRowVersionEnum values that specifies the desired row version. Possible values are Default, Original, Current, and Proposed. An Object that contains the data. Gets or sets the data stored in the row in one of the fields. The name of the field. One of the DataRowVersionEnum values that specifies the desired row version. Possible values are Default, Original, Current, and Proposed. An Object that contains the data. Gets or sets the data stored in the row in one of the fields. The data field that contains the data. One of the DataRowVersionEnum values that specifies the desired row version. Possible values are Default, Original, Current, and Proposed. An Object that contains the data. Gets or sets all of the field values for this row through an array. Gets the current state of the row. Modifying field values, deleting a row and adding a row changes the row state. While the row is in edit mode (see ), the state does not change on field modifications until is called (see also property). Calling or resets the state of all rows. Gets a value indicating whether there are errors in some of the row field values. Validating data, you can set an error on any field in a row. Data bound controls can use this information to show user interface clues for errors. Also, an error can be assigned to a whole row using the property. Update errors occurring in specific rows set the RowError property for rows with errors. Use to set an error on a field, and property to set an error for the whole row. Use the and methods to return field errors. Use the property to return error information for the whole row. The method clears all errors for the row. Gets or sets the custom error description for a row. See for details. For a row in edit mode, gets a value indicating whether at least one of row values has been changed. For a row not in edit mode (not between and ), this property returns False. In this case, use the property to determine if the row was changed. Gets the object representing this row in data binding interface IList. Gets the position of the row in the . Gets a collection of custom user information associated with the row. Gets the ADO.NET DataRow object storing data of this C1DataRow. The DataRow belongs to the table . This property returns a non-null value only for simple table rows. For rows belonging to objects representing composite tables and table views, this property returns null (Nothing in Visual Basic). The BaseLogic class is a common base class from which and component classes are derived. Fired before a field value is set. This event can be used to specify validation logic that cannot be specified in the form of constraint expressions. Throwing an exception in this event disallows the change. When this event occurs, the field value is not yet modified. The new (proposed) value is available in the NewValue argument of the event. Events on Modifying Row Fired after a field value is set. This event, among other possible actions, allows other fields/rows/tables to be modified depending on this field. The new value is already assigned to the field, and the old field value is also available in this event, in its OldValue argument. Knowing the old value can be useful, for example, in updating counters, where you may need to add the new value and subtract the old one. Events on Modifying Row Fired before a new (empty) row is added. Throwing an exception in this event cancels adding a row. Events on Adding Row Fired after a new (empty) row is added. This event can be used to fill default values of the fields according to some rules that cannot be specified as simple values of the property. It can also be used to specify the primary key values, see Keys Assigned by Client: New Row Detached and Attached State. The ParentRow argument is used in AfterAddNew event on the data set level (in a component), in a master-detail situation. When a new row is added to the child (detail) table view, this argument contains the parent row to which the new child row belongs. Under other circumstances and in other events this argument contains null. This argument is necessary because in this case parent row cannot be found using the , as the new row is yet in detached state, see Keys Assigned by Client: New Row Detached and Attached State. becomes accessible only in the event. Events on Adding Row Fired when all changes initiated by a field change are done and handled by the business logic code. This event occurs when all changes to a row are finished, including both the changes made directly by the user and those resulting from executing event code that handled those changes. It is designed specifically to ensure that this is the "last change", so the developers can put code that relies on the "finality" of changes to a row. For instance, this event is the best place to put code setting calculated field values (for calculations that cannot be specified as simple calculation expressions. When a field value in a row changes, that change can be handled by event code that in its turn can make other changes to row fields, or it could change other rows or other tables. When all such handling is done, C1DataObjects collects all changed rows and fires the AfterChanges event for every row that has changed in the process. Setting the property to True, firing AfterChanges event can be deferred until the property is set back to False. This allows multiple field changes to be performed with AfterChanges firing only once, when all changes are done. Events on Editing Row Fired when the user starts editing a row, before the row enters edit mode. Throwing an exception in this event prevents the row going into edit mode. Writing code handling edit mode events, take into account that in addition to explicit programmatic calls to /, edit mode is also used by data bound controls: when a row becomes current, it is automatically placed in edit mode ( is called implicitly). For example, throwing an exception in BeforeBeginEdit event will prevent bound controls from positioning on a row. This also means that BeforeBeginEdit event does not indicate an attempt to change a row. If you need to execute some code when a row is being changed, consider using / events instead. Events on Editing Row Fired when the user starts editing a row, after the row enters edit mode. Events on Editing Row Fired when the user finishes editing a row, before the row leaves edit mode. Throwing an exception in this event prevents the row from leaving edit mode. Use this event for validating changes done to a row, testing conditions that depend on multiple fields, so these conditions can be tested only when all the changes are done, the whole row changed, as opposed to conditions depending on a single field. The latter are usually tested in the event. See also , and for alternative, codeless ways of specifying validation conditions. Writing code handling edit mode events, take into account that in addition to explicit programmatic calls to /, edit mode is also used by data bound controls: when a row becomes current, it is automatically placed in edit mode ( is called implicitly). When the user moves to another row, the row exits edit mode (EndEdit is called implicitly). For example, throwing and exception in event will prevent bound controls from leaving the row. If you want to test validation conditions only when the row has been changed while it was in edit mode and not when it was just moved to and out of edit mode without making changes, use the Modified argument to distinguish between these two cases. Events on Editing Row Fired when the user finishes editing a row, after the row leaves edit mode. Events on Editing Row Fired when the user cancels editing a row, before reverting the changes made to the row. Throwing an exception in this event prevents reverting the changes in the row. Events on Editing Row Fired when the user cancels editing a row, after reverting the changes made to the row. Events on Editing Row Fired before a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (=false) fields are specified. Throwing an exception in this event aborts the process of attaching the row (making it a regular, that is, attached) row, as opposed to a just added, or detached row) and aborts , if the row is being attached as a result of an call. Events on Adding Row Fired after a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (=false) fields are specified. A new row is created empty, filled with default values, its primary key undefined. A row with undefined primary key is in a special transitory state called detached, the process of adding this row to the rowset is yet incomplete. For example, such row will not be sent to the database for update. A row becomes a full-fledged table row only after its primary key is set and any fields with =false are set too. This is when this event happens. Events on Adding Row Fired before first change is made to a row (a field value changes) after the row last entered edit mode. Throwing an exception in this event disallows changes to the row. Events on Editing Row Fired after first change is made to a row (a field value changes) after the row last entered edit mode. This event occurs after the first change has been successfully performed on a row. It can be used, for example, for showing some user interface clues indicating that the row has been changed (canceling them in and , if necessary). After the event has been fired for the first time, successive changes to row fields do not fire the /AfterFirstChange events until the row leaves edit mode. Events on Editing Row Fired before a row is deleted. Throwing an exception in this event cancels deleting the row. Events on Deleting Row Fired after a row has been deleted. To access field values in the deleted row, use the ItemArray argument. The values are not accessible through regular row properties once the row has been deleted. Events on Deleting Row Fired before modifications made to a row are committed to the database. For a bound table, this event can be used to examine and possibly modify the SQL command performing the update. For an SQL-based table, this event must be used to specify the SQL command performing the update. The IDbCommand object is created and passed as an argument to the event. Event code must set the CommandText property of the command object. For an unbound table, updating the row must be performed in the event code. C1DataObjects does not create a command object in this case. The result of the update operation must be communicated to C1DataObjects by setting the Status, SqlStatus and Error arguments in the event code. Although this is less frequently done, the Status, SqlStatus and Error arguments can be changed in event code for bound and SQL-based tables as well as for unbound tables. This too affects the success/failure status of the operations and determines further course of action followed by C1DataObjects. C1ExpressConnection Class Events in Updating a Row Events on Updating Database Bound, SQL-Based and Unbound Tables Fired after modifications made to a row are committed to the database. The AfterUpdateRow event is fired for every row that fired the event, regardless of the outcome of the update operation for that row. If row update was unsuccessful, that is reflected in the values of Status, SqlStatus and Error arguments. This event can be used to change the outcome of the operation from failure to success and vice versa, see the description of the Status, SqlStatus and Error arguments. This event can also be used to modify values refreshed from the database after the update operation, see the description of the Row argument. C1ExpressConnection Class Events in Updating a Row Events on Updating Database Bound, SQL-Based and Unbound Tables Fired when has been performed for a table or for the whole data set. Calling triggers this event once in the component attached to the data set definition, if one exists. In this case the e.DataTable argument is null. Calling triggers this event in the component attached to the simple table in question (if such component exists) and then in the component. In this case, e.DataTable argument points to the for which AcceptChanges was called. Calling C1DataRow.AcceptChanges also triggers this event in component and then in component. Fired when RejectChanges has been performed for a table or for the whole data set. Calling triggers this event once in the component attached to the data set definition, if one exists. In this case the e.DataTable argument is null. Calling triggers this event in the component attached to the simple table in question (if such component exists) and then in the component. In this case, e.DataTable argument points to the C1DataTable for which RejectChanges was called. Calling also triggers this event in component and then in component. This property determines the schema owning this business logic component. The component specifies business logic for a table in the schema, if it is a component, or to one or more table views in the schema, if it is a component. Returns or sets the C1SchemaDef component holding the owner schema. A C1TableLogic component hosts business logic event code for a table. It connects to the schema by setting its property, and to a particular table in the schema by setting its Table property. Business logic is then specified in its events inherited from the class. Business Logic Returns or sets the name of the table represented by this component. Normally, this property is not set by user code. It is set by C1DataObjects SchemaDesigner. User code gets the value of this property to gain access to schema objects and possibly modify them at run time, in the event. Returns or sets the ADO.NET IDBDataAdapter component used to fill and update the table with = SqlBased. This property allows to support updateable SQL-based tables based on a SQL SELECT statement or a stored procedure, without manual code, using ADO.NET data adapter. This makes working with SQL-based tables in C1DataObjects almost as easy as working with bound tables (when =Bound, set to a database table name). However, bound tables should be always preferable when you have a choice. Bound tables are more intimately related to database tables, so C1DataObjects can support features, such as virtual mode, that are unavailable for SQL-based tables, see Bound, SQL-Based and Unbound tables. See the SQLBasedTablesEasy sample in the samples directory for an example of using a data adapter. In C1DataObjects Enterprise edition, data adapter is specified in the DataAdapter property of a component attached to a table. The table must be SQL-based (=SqlBased). In C1DataExpress, it is specified in the C1ExpressTable DataAdapter property. In both editions, a data adapter component can be created using the Create DataAdapter context menu item or created manually and attached to the DataAdapter property. If specified, the DataAdapter is used to fill and update the table. Filling the table, only its SelectCommand property is used, not the whole data adapter component. The SelectCommand is executed to fetch the data on filling the data set. Updating modified rows to the database, C1DataObjects calls the data adapter's method DbDataAdapter.Update(DataRow[]) for each modified row (each call uses a single element in the DataRow[] array). A data adapter component must be attached to a Connection component. The Create DataAdapter menu item creates that component automatically. The connection component is used only at design time. At run time, it is always ignored, the schema connection (or, in the Express edition, C1ExpressConnection.ConnectionString) is always used at run time regardless of what you specify in DataAdapter.Connection. You are not required to set up the adapter's TableMappings property. It is not used at run time. C1DataObjects always uses the mapping between your table fields and the database fields that you already have in the schema in the fields' property. In fact, the adapter's TableMappings are automatically updated to reflect the mappings specified in the fields' DbFieldName property. ADO.NET data adapter supports both SQL statements and stored procedures. To fill a SQL-based table with data returned by a stored procedure, set =StoredProcedure and type the procedure name in the property or select it from the dropdown list of stored procedures in SelectCommandText. When you set to a procedure name, the fields returned by the procedure are automatically retrieved (if the procedure returns a recordset; only procedures returning a recordset as return value or one of out parameters can be used in C1DataObjects as well as in ADO.NET). When you use a stored procedure as your (=StoredProcedure; in this case your adapter's SelectCommand will also be the same stored procedure), you can specify parameter values in the data adapter's SelectCommand property. Even if you do not use data adapter for update (in which case you can leave its UpdateCommand/ InsertCommand/DeleteCommand properties empty), you can use it this way to specify parameter values for the stored procedure you use to fill the table. Regardless of whether you use a stored procedure or a SQL statement in , your data adapter commands for updating modified rows (data adapter properties UpdateCommand, InsertCommand, DeleteCommand) can be either SQL statements or stored procedures, as supported by the data adapter (so you can select Create New Stored Procedures or Use Existing Stored Procedures in the wizard). If a data adapter is used for update, some C1DataObjects update features become unavailable, as they only relate to update made by SQL commands generated by C1DataObjects itself, not by an external component. These are table properties UpdateLocateMode, UpdateRefreshMode, IgnoreDeleteError, field properties AutoIncrement (only on the server, it still works on the client), UpdateLocate, UpdateRefresh, UpdateSet. This does not mean that features supported by these properties are unavailable, it only means that they must be supported in a different way. All these features are supported by ADO.NET DataAdapter, but may require more property settings and some coding, see the ADO.NET documentation. To control the update process for every row, you can use and events in SQL-based tables with DataAdapter as well as in bound tables. You can also use RowUpdating and RowUpdated events of the data adapter component. These events fire between and events. They (and data adapter's ContinueUpdateOnError property) allow you to specify whether to continue or throw an exception, allow to make this decision in the context of the data adapter component itself. If an exception is thrown, it is passed to the event, and, if it is suppressed in the adapter event, then, accordingly, does not receive an error. But using adapter events is optional, you can do all necessary error handling in the event. Bound, SQL-Based and Unbound Tables A C1DataSetLogic component hosts business logic event code for a data set, for all table views of that data set. It connects to the schema by setting its Schema property, and to a particular data set definition in the schema by setting its property. Business logic is then specified in its events, most of which are inherited from the class. Fired before generating the SQL SELECT statement for fetching a table view from the database. This event is used for SQL-based tables to specify the SQL SELECT statement that populates the table, fetches data from the database. The SQL statement is assigned to the Sql argument or to the CommandText property of the Command argument. If you use the Command argument, the command does not necessarily have to contain a SELECT statement. You can use a stored procedure instead, or you can use a parameterized SELECT. You can even create your own command object and assign it to the Command argument. The only requirement is that you set up the Command argument passed to the event with all necessary properties so it becomes a valid IDbCommand ready for execution. C1DataObjects executes the command's ExecuteReader method. Bound, SQL-Based and Unbound Tables Fired after generating the SQL SELECT statement for fetching a table view from the database. In this event, you can examine and modify the SQL SELECT statement generated by C1DataObjects. Fired before a table view is fetched from the database. This event is mainly intended for populating unbound tables. Unbound table fetch is performed in the event code. To provide data, you must create a data reader implementing the System.Data.IDataReader interface and assign it to the Reader argument. C1DataObjects provides a helper class that you can use to create your reader. If you have your data in the form of a System.Data.DataTable, create an passing the DataTable object to its constructor. You can also create standard .NET Framework or third-party objects implementing IDataReader, such as OleDbReader or SqlDataReader, or implement your own custom data reader, if necessary. Before any BeforeFetch events are fired for individual table views, a BeforeFetch event is fired for the whole fetch session, with the TableView argument set to null (Nothing in Visual Basic). Use this event to execute code before any table views are fetched. Bound, SQL-Based and Unbound Tables An AfterFetch event is fired after a table view has been fetched from the database. Also, after all AfterFetch events have been fired for individual table views, an AfterFetch event is fired for the whole fetch session, with the TableView argument set to null (Nothing in Visual Basic). Use this event to execute code after all table views have been fetched. Bound, SQL-Based and Unbound Tables Fired before all changes in the data set are updated to the database. Before any modified rows are committed to the database, the BeforeUpdate event fires. The DataSet argument contains the data set passed to the server for update. By modifying this data set, you can customize the update process, control the set of rows and field values that undergo database update. You can even perform the whole update process in your code in the BeforeUpdate event and tell C1DataObjects to skip further processing, consider it done, by setting the Status argument to Skip. If you detect an unrecoverable error in this event, set the Status argument to ErrorsOccurred and set the Error argument to describe the error. C1ExpressConnection Class Controlling the Update Process Fired after all changes in the data set are updated to the database. The AfterUpdate event is fired after the update process is completed or skipped, regardless of whether it was successful or failed. The success status of the update process is passed to the event in the Status argument. The Status argument can also be modified by the event code to make C1DataObjects ignore an error, or vice versa, to make the update fail. Among its possible uses, this event allows to control the whole data set (via its Tables argument) sent back to the client for refreshing updated rows, see Changing Data as a Result of Update (Refresh). C1ExpressConnection Class Controlling the Update Process Used to programmatically specify the list of child rows for a relation. This event can be used to create custom view relations, when the rule defining the list of child rows for a parent row cannot be formulated based on a simple relation between tables. For example, see CustomRelations sample in the Samples directory, where a custom relation is used to represent a many-to-many relation. If the property is set to True for a view relation, the GetChildRows event is called every time C1DataObjects needs to obtain the list of child rows for a parent row for that relation. Event code sets the argument e.List to a list of rows, thus defining the child rows of the relation. The resulting list, if not empty, must contain objects belonging to the child table view of the relation. View Relations Used to programmatically specify the parent row for a relation. This event can be used in addition to event for two-way custom view relations. If the property is set to True, the custom relation does not support getting parent row (note that only is used for master-detail data binding, GetParentRow is not necessary, it may only be needed in code). If =False for a custom relation, C1DataObjects calls the GetParentRow event to obtain the parent row whenever is called. C1ExpressConnection Class View Relations Returns or sets the name of the data set represented by this component. Provides data for AfterFieldChange and BeforeFieldChange events in (, ) and C1DataExpress components. The table object where the event has occurred. The row where the event has occurred. The field changing value. The field value after change. The field value before change. Represents the method that handles BeforeFieldChange and AfterFieldChange events. The source of the event. A object that contains the event data. Indicates an action performed on a data row. No action. Row switched to edit mode. Row left edit mode. Canceled changes made to the row in edit mode. Row changed first time since it entered edit mode. All actions directly triggered by the user and by code that handled them, have been handled. After that, C1DataObjects gives the programmer an opportunity to perform whatever actions necessary after handling all the changes. A new (empty) row added. An added row becomes a regular row in the rowset. It happens when its primary key and other required (=false) fields are specified. Row deleted. or called. or called. Provides data for events which occur when an action is performed on a . The table object where the event has occurred. The row where the event has occurred. Parent row. For a deleted row, in event, the array of field values in the row before the row was deleted. This property is not set in events other than AfterDelete. This property must be used in event to access row values because they are not accessible through regular row properties after the row has been deleted. For events , , this property indicates whether the row has been modified while it was in edit mode. This property is often needed in / because data-bound controls begin edit mode when they position on a row and end edit mode when they leave the row, even if no changes have been made to the row in the process. The action that has occurred. Represents the method that handles events which occur when an action is performed on a . The source of the event. A object that contains the event data. Provides data for the and events. The data set where the event has occurred. Filter conditions used to fill the data set. Used to detect which table views are being filled in the event. Represents the method that handles the and events. The source of the event. A object that contains the event data. Indicates status before and after an operation on a table view in a data set or on a whole data set. Successful operation. If this status value is set in event code, operation must be skipped and considered successful. Operation failed. Provides data for the and events. Events in Updating a Row Events on Updating Database The data set where the event has occurred. Success or failure status of the operation. In events occurring before operation and allowing to change the status argument, user code can change the status to indicate whether to proceed with the operation, skip or abort it. For an unsuccessful operation, information detailing the error. Returns the table collection of the data set. Use this property to gain access to table data in 3-tier configuration, where the DataSet argument is not set because it resides on the client and the event is fired on the server. Returns the table view collection of the data set. Use this property to gain access to table view data in 3-tier configuration, where the DataSet argument is not set because it resides on the client and the event is fired on the server. Represents the method that handles the and events. The source of the event. A object that contains the event data. Provides data for the and events. Bound, SQL-Based and Unbound Tables The table view populated with the SQL SELECT statement. Filter conditions used to fill the data set. These are all filter conditions for all table views in the data set. You need to extract the filter conditions for the particular table view from this argument. The IDbCommand object containing the generated SQL SELECT statement. SQL statement. The programmer can set this argument in the event code to set or modify the SQL SELECT statement used for fetching data. Alternatively, the programmer can set or modify the Command argument to specify the complete command to be executed. ClauseSelect/ClauseFrom/ClauseWhere/ClauseOrderBy are read-only properties that are available in AfterGenerateSql event (not available in BeforeGenerateSql). They contain corresponding parts of the automatically generated SQL SELECT statement (the complete statement is available in the Sql property). They can be used to modify/compose a statement, for example, to add TOP n or another clause after the SELECT clause. ClauseSelect/ClauseFrom/ClauseWhere/ClauseOrderBy are read-only properties that are available in AfterGenerateSql event (not available in BeforeGenerateSql). They contain corresponding parts of the automatically generated SQL SELECT statement (the complete statement is available in the Sql property). They can be used to modify/compose a statement, for example, to add TOP n or another clause after the SELECT clause. ClauseSelect/ClauseFrom/ClauseWhere/ClauseOrderBy are read-only properties that are available in AfterGenerateSql event (not available in BeforeGenerateSql). They contain corresponding parts of the automatically generated SQL SELECT statement (the complete statement is available in the Sql property). They can be used to modify/compose a statement, for example, to add TOP n or another clause after the SELECT clause. ClauseSelect/ClauseFrom/ClauseWhere/ClauseOrderBy are read-only properties that are available in AfterGenerateSql event (not available in BeforeGenerateSql). They contain corresponding parts of the automatically generated SQL SELECT statement (the complete statement is available in the Sql property). They can be used to modify/compose a statement, for example, to add TOP n or another clause after the SELECT clause. Success or failure status of the operation. In events occurring before operation and allowing to change the status argument, user code can change the status to indicate whether to proceed with the operation, skip or abort it. Represents the method that handles the and events. Provides data for the and events. Bound, SQL-Based and Unbound Tables The table view being populated. Filter conditions used to fill the data set. These are all filter conditions for all table views in the data set. You need to extract the filter conditions for the particular table view from this argument. For a bound or SQL-based table, the IDbCommand object containing the generated SQL SELECT statement. This argument is null for an unbound table. The generated SQL SELECT statement. The reader object providing the fetched data. Success or failure status of the operation. In events occurring before operation and allowing to change the status argument, user code can change the status to indicate whether to proceed with the operation, skip or abort it. Returns the table collection of the data set being populated. Returns the table views collection of the data set being populated. Represents the method that handles the and events. Bound, SQL-Based and Unbound Tables Indicates status before and after an operation on a data row, e.g., committing (updating) the row to the database. Successful operation. Operation failed due to an exception (error) condition that occurred while performing the operation. If this status value is set in event code, operation must be considered failed and aborted. If this status value is set in event code, operation must be skipped and considered successful. This enumeration specifies success or failure of a database access operation, including specific reasons of operation failure. Successful operation. Operation failed due to an error executing SQL INSERT command. Operation failed due to an error executing SQL DELETE command. Operation failed due to an error executing SQL UPDATE command. Operation failed due to an error executing SQL SELECT command. Operation failed due to concurrency conflict, that is, the target row could not be found in the database, presumably because another user has modified it. Provides data for the and events. Events on Updating Database Events in Updating a Row Returns the table collection with all data being updated to the database. Returns the table view collection with all data being updated to the database. The row that is committed to the database. Success or failure status of the operation. In events occurring before operation and allowing to change the status argument, user code can change the status to indicate whether to proceed with the operation, skip or abort it. For an unsuccessful operation, information detailing the error. Success or failure status of the database access operation. For an unsuccessful operation, specifies the cause of failure. For an added row, the object representing the SQL INSERT command used to add the row to the database. For a deleted row, the object representing the SQL DELETE command used to delete the row from the database. For a modified row, the object representing the SQL UPDATE command used to add the row to the database. For a modified and added row, the object representing the SQL SELELCT command used to refresh the row with database values after the row has been committed to the database. Represents the method that handles the and events. Provides data for PositionChanged event in , , and C1DataExpress components. Current row before position change. Current row after position change. DataMember string identifying the member (node in master-detail hierarchy) that has changed current row position. The CurrencyManager object managing current row position for the data member. The row object that has become current. Represents the method that handles the PositionChanged event in , , and C1DataExpress components. BaseDataSourceComponent.PositionChanged Event Provides data for the event in and C1DataExpress components. Indicates whether an error message is shown. Set this argument to False if you have already shown an error message or otherwise handled the error and do not want the standard error message to appear. Exception object describing the error. Represents the method that handles the event in and C1DataExpress components. C1ExpressTable.UpdateError Event C1ExpressConnection.UpdateError Event Provides data for the , and events. This argument contains the list of rows. In events returning a list, create a new ArrayList object, fill it with rows and assign to the List argument. In events returning a single row (for example, GetParentRow:C1DataSetLogic event), add a single row to the list. The row on which to base the list. In GetParentRow:C1DataSetLogic event, the parent row of the view, if it is a child view. In GetChildRows:C1DataSetLogic event, the parent row for which to return child rows. The name of the relation (in GetRows:C1DataView event, empty if the view is not a child view). Represents the method that handles the , and events. Indicates a type of change occurring in Event. Indicates that the end user or user code modified a field. Indicates that the current row has changed. Provides data for the event in and C1DataExpress components. Indicates a type of change occurred. Row that became current, or null if there is no current row (empty rowset). Position of Row in the list. Name the of table on which the rowset is based. Name of the table view on which the rowset is based. In C1DataView, if the rowset represents rows directly from a table, that is, when TableName property is used to define the rowset source, this property value is empty string. For C1DataSet rowsets, that is, when a C1DataSet component is specified as the DataSource value for a bound control, this property returns the DataMember value used to bind to this rowset. In other cases, the value is empty string. Returns the CurrencyManager object that manages this rowset. Represents the method that handles the event in and C1DataExpress components. Base class for and C1DataExpress components. Moves to the first row. Use this method to navigate the underlying rowset in virtual mode. Although this method is applicable in all modes, it is only necessary in virtual mode. In virtual mode, the underlying contains only a segment of available data. To navigate the whole rowset, you need to use methods MoveFirst, , , , . If the rowset contains at least one row, this method moves to the first row and returns True; otherwise, it returns False. After this method, properties and point to the first row. C1ExpressTable Class Virtual Mode - Dealing with Large Datasets Moves to the last row. Use this method to navigate the underlying rowset in virtual mode. Although this method is applicable in all modes, it is only necessary in virtual mode. In virtual mode, the underlying contains only a segment of available data. To navigate the whole rowset, you need to use methods , MoveLast, , , . If the rowset contains at least one row, this method moves to the last row and returns True; otherwise, it returns False. After this method, properties and point to the first row. C1ExpressTable Class Virtual Mode - Dealing with Large Datasets [C1Category("Data")] Moves to the next row. Use this method to navigate the underlying rowset in virtual mode. Although this method is applicable in all modes, it is only necessary in virtual mode. In virtual mode, the underlying contains only a segment of available data. To navigate the whole rowset, you need to use methods , , MoveNext, , . If the current row is not the last row in the underlying data table, this method moves to the next row and returns True; otherwise, it returns False. After this method, the property is incremented by 1 and the returns the next row. C1ExpressTable Class Virtual Mode - Dealing with Large Datasets [C1Category("Data")] Moves to the previous row. Use this method to navigate the underlying rowset in virtual mode. Although this method is applicable in all modes, it is only necessary in virtual mode. In virtual mode, the underlying contains only a segment of available data. To navigate the whole rowset, you need to use methods , , , MovePrevious, . If the current row is not the first row in the underlying data table, this method moves to the next row and returns True; otherwise, it returns False. After this method, the property is decremented by 1 and the returns the next row. C1ExpressTable Class Virtual Mode - Dealing with Large Datasets [C1Category("Data")] Seeks a row by its primary key values. Use this method to navigate the underlying rowset in virtual mode. In virtual mode, the underlying contains only a segment of available data. To navigate the whole rowset, you need to use methods , , , , Seek. This method seeks for the search key in the whole rowset. If the search key is greater than all the keys in the rowset, the method returns False. Otherwise, it finds the first row with the key greater than or equal to the search key, positions the component on the found row (so the properties and point to the found row) and returns true. It also sets the ExactMatch argument to indicate whether an exact match was found or the first row with key value greater than the search key. The primary key value to search for. This parameter is undefined when the method is called. After the method returns, it contains a value indicating whether the found row contains exactly the key value the method searched for, or it is the row with the next key value in the primary key order. It is set to False if the row with exact key match was not found. C1ExpressTable Class Virtual Mode - Dealing with Large Datasets [C1Category("Data")] Fired in = VirtualAutomatic, when all rows are fetched. This event is fired if the is in = VirtualAutomatic. It indicates the end of the fetch process. C1ExpressTable Class Virtual Mode - Dealing with Large Datasets [C1Category("Data")] Fired before a field value is set. This event can be used to specify validation logic that cannot be specified in the form of constraint expressions. Throwing an exception in this event disallows the change. When this event occurs, the field value is not yet modified. The new (proposed) value is available in the NewValue argument of the event. Events on Modifying Row Fired after a field value is set. This event, among other possible actions, allows other fields/rows/tables to be modified depending on this field. The new value is already assigned to the field, and the old field value is also available in this event, in its OldValue argument. Knowing the old value can be useful, for example, in updating counters, where you may need to add the new value and subtract the old one. Events on Modifying Row Fired before a new (empty) row is added. Throwing an exception in this event cancels adding a row. Events on Adding Row Fired after a new (empty) row is added. This event can be used to fill default values of the fields according to some rules that cannot be specified as simple values of the property. It can also be used to specify the primary key values, see Keys Assigned by Client: New Row Detached and Attached State. The ParentRow argument is used in AfterAddNew event on the data set level (in a component), in a master-detail situation. When a new row is added to the child (detail) table view, this argument contains the parent row to which the new child row belongs. Under other circumstances and in other events this argument contains null. This argument is necessary because in this case parent row cannot be found using the , as the new row is yet in detached state, see Keys Assigned by Client: New Row Detached and Attached State. becomes accessible only in the event. Events on Adding Row Fired when all changes initiated by a field change are done and handled by the business logic code. This event occurs when all changes to a row are finished, including both the changes made directly by the user and those resulting from executing event code that handled those changes. It is designed specifically to ensure that this is the "last change", so the developers can put code that relies on the "finality" of changes to a row. For instance, this event is the best place to put code setting calculated field values (for calculations that cannot be specified as simple calculation expressions. When a field value in a row changes, that change can be handled by event code that in its turn can make other changes to row fields, or it could change other rows or other tables. When all such handling is done, C1DataObjects collects all changed rows and fires the AfterChanges event for every row that has changed in the process. Setting the property to True, firing AfterChanges event can be deferred until the property is set back to False. This allows multiple field changes to be performed with AfterChanges firing only once, when all changes are done. Events on Editing Row Fired when the user starts editing a row, before the row enters edit mode. Throwing an exception in this event prevents the row going into edit mode. Writing code handling edit mode events, take into account that in addition to explicit programmatic calls to /, edit mode is also used by data bound controls: when a row becomes current, it is automatically placed in edit mode ( is called implicitly). For example, throwing an exception in BeforeBeginEdit event will prevent bound controls from positioning on a row. This also means that BeforeBeginEdit event does not indicate an attempt to change a row. If you need to execute some code when a row is being changed, consider using / events instead. Events on Editing Row Fired when the user starts editing a row, after the row enters edit mode. Events on Editing Row Fired when the user finishes editing a row, before the row leaves edit mode. Throwing an exception in this event prevents the row from leaving edit mode. Use this event for validating changes done to a row, testing conditions that depend on multiple fields, so these conditions can be tested only when all the changes are done, the whole row changed, as opposed to conditions depending on a single field. The latter are usually tested in the event. See also , and for alternative, codeless ways of specifying validation conditions. Writing code handling edit mode events, take into account that in addition to explicit programmatic calls to /, edit mode is also used by data bound controls: when a row becomes current, it is automatically placed in edit mode (BeginEdit is called implicitly). When the user moves to another row, the row exits edit mode (EndEdit is called implicitly). For example, throwing and exception in BeforeEndEdit event will prevent bound controls from leaving the row. If you want to test validation conditions only when the row has been changed while it was in edit mode and not when it was just moved to and out of edit mode without making changes, use the Modified argument to distinguish between these two cases. Events on Editing Row Fired when the user finishes editing a row, after the row leaves edit mode. Events on Editing Row Fired when the user cancels editing a row, before reverting the changes made to the row. Throwing an exception in this event prevents reverting the changes in the row. Events on Editing Row Fired when the user cancels editing a row, after reverting the changes made to the row. Events on Editing Row Fired before a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (=false) fields are specified. Throwing an exception in this event aborts the process of attaching the row (making it a regular, that is, attached) row, as opposed to a just added, or detached row) and aborts , if the row is being attached as a result of an call. Events on Adding Row Fired after a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (=false) fields are specified. A new row is created empty, filled with default values, its primary key undefined. A row with undefined primary key is in a special transitory state called detached, the process of adding this row to the rowset is yet incomplete. For example, such row will not be sent to the database for update. A row becomes a full-fledged table row only after its primary key is set and any fields with =false are set too. This is when this event happens. Events on Adding Row Fired before first change is made to a row (a field value changes) after the row last entered edit mode. Throwing an exception in this event disallows changes to the row. Events on Editing Row Fired after first change is made to a row (a field value changes) after the row last entered edit mode. This event occurs after the first change has been successfully performed on a row. It can be used, for example, for showing some user interface clues indicating that the row has been changed (canceling them in and , if necessary). After the AfterFirstChange event has been fired for the first time, successive changes to row fields do not fire the /AfterFirstChange events until the row leaves edit mode. Events on Editing Row Fired before a row is deleted. Throwing an exception in this event cancels deleting the row. Events on Deleting Row Fired after a row has been deleted. To access field values in the deleted row, use the ItemArray argument. The values are not accessible through regular row properties once the row has been deleted. Events on Deleting Row Gets or sets a value indicating whether modified rows are immediately updated to the database when the end user leaves the row. This property is False by default, which means that you need to call the method of the object to commit changes to the database. If it is set True, C1DataObjects automatically calls when the user changes a row in a control bound to this component and leaves that row. When the Database is Updated C1ExpressTable Class Gets the source containing the data. The data table returned by this property is used for programmatic access to the table data. C1ExpressTable Class Gets the object representing the current row. This property returns the row data controls bound to this component are currently positioned on. The index of this row is returned by the property. C1ExpressTable Class C1DataTableSource has two main uses: You can use C1DataTableSource to handle business logic events in your client application code, in addition to the business logic specified in the data library, see Business Logic for details. You must use C1DataTableSource as the data source for your bound controls to make them work in virtual mode, see Virtual Mode - Dealing with Large Datasets for details. C1DataTableSource is used as a data source for bound controls, such as grids and others. Initializes a new instance of the C1DataTableSource class. Gets or sets the to which this component belongs. Gets or sets the name of the table view represented by this component. Indicates whether the Row property can be used. Gets or sets the current row index. Specifies whether actions in handling business object events are deferred or performed immediately. Use the members of this enumeration to determine the action performed on a data row. C1ExpressConnection.ExecutionMode Property Action Order and Execution Mode Actions performed immediately. Actions deferred until the current user action handling is completed. An element of a field's collection. Gets or sets the expression producing the result of a calculation. C1DataObjects Expressions Table Fields Gets or sets an optional Boolean expression defining applicability of a calculation. If this expression is empty or evaluates to True, the is evaluated and assigned to the field. If it evaluates to False, this calculation is skipped. C1DataObjects Expressions Table Fields Gets or sets a value indicating whether calculation triggers the same events as field modification by the user. This property is set to False by default. If it is set to True, setting the value from calculation expression triggers the same sequence of events (, , ) as if the end user has modified the value. Table Fields Represents a collection of objects. Adds an element to the collection. The object to be added to the end of the collection. Inserts an element into the FieldCalculationCollection at the specified index. The zero-based index at which calculation should be inserted. The object to insert. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Returns the zero-based index of the calculation object in the collection. The object to locate in the collection. The zero-based index of the calculation object, if found; otherwise, -1. Determines whether an element is in the collection. The Object to locate in the collection. True if calculation object is found in the collection; otherwise, False. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Gets the element of the collection at the specified index. The zero-based index of the element. Represents the exception that is thrown when attempting an action that violates a constraint. Gets the where the exception occured. Gets the where the exception occured. An element of a field's collection. Gets or sets the Boolean expression used to test a constraint. Table Fields Gets or sets an optional Boolean expression defining applicability of a constraint. If this expression is empty or evaluates to True, the is evaluated. If it evaluates to False, this constraint is skipped. Table Fields Gets or sets the string used as the error description in the exception thrown when a constraint is not satisfied. C1DataObjects Expressions Table Fields Represents a collection of objects. Adds an element to the collection. The object to be added to the end of the collection. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Returns the zero-based index of the constraint in the collection. The Object to locate in the collection. The zero-based index of the constraint, if found; otherwise, -1. Determines whether an element is in the collection. The Object to locate in the collection. True if constraint is found in the collection; otherwise, False. Gets the element of the collection at the specified index. Specifies the version of a . Current values in the row. Default values in an added row, as they were immediately after the row was added. Original values in the row, as they were fetched from the database. Values set in edit mode, they have not yet become current, will become current when edit mode ends. Specifies the state of a . The row was added using the AddNew method of . The row was deleted using the Delete method of . The row was removed from the table and will be destroyed. Detached rows are not considered deleted, they are completely removed from the data set and will not be accessible. Some row field values were modified. If the modification occurred in edit mode, the edit was ended. The row has not changed since , or . Specifies a subset of rows satisfying certain status and version conditions. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values. None Original rows, including ModifiedOriginal, deleted and unchanged. Current rows including unchanged, new, and modified rows. New rows. Deleted rows, not including rows that were first added, then deleted (those are completely removed and cannot be accessed). Modified rows. The original version of modified rows (the modified version is available as ModifiedCurrent). Unchanged rows. Specifies how a command string is interpreted. A SQL statement. A stored procedure name. Base class for all C1DataObjects exception classes. Gets the name of the table or table view where the exception occurred. To distinguish between tables and table views, use properties and . This property returns empty string if the exception is not related to a particular table or table view. Gets a value indicating whether the object where the exception occurred is a table (as opposed to a table view). Gets a value indicating whether the object where the exception occurred is a table view (as opposed to a table). Gets the name of the field where the exception occurred. This property returns empty string if the exception is not related to a particular field. Gets the index of the row where the exception occurred. This property returns -1 if the exception is not related to a particular field. Gets or sets a value determining whether error message must be displayed by bound controls or it should be suppressed since C1DataObjects already handled the error. This property is False by default. If an exception generates error messages in bound controls, and you want to suppress them because you already showed an error message or otherwise handled the error in object's event, set this property to true in the event code. This behavior is only supported by data bound controls honoring the ShowMessage property, such as ComponentOne FlexGrid and C1TrueDBGrid. Represents an exception that is thrown when an action is canceled by throwing an exception in a business logic event (see Business Logic). To retrieve the exception thrown by the user code in a business logic event, use the InnerException property belonging to the System.Exception class. Represents an exception that is thrown when attempting an operation using an invalid field expression. Represents an exception that is thrown while performing database access operations fetching data or updating the database. Gets the name of the object used to connect to the database. Specified an operation performed over data or data components. No operation. Adding new row. Deleting a row. Modifying a row. Updating the database. Initializing a component. Filling a component with data. Represents an exception that is thrown on attempt to perform an action that is disabled by the current property settings. Represents an exception that is thrown on attempt to perform an action that is disabled by the current property settings (such as , , etc.) or the current state of an object. Gets the attempted operation. Represents an exception that is thrown when an operation, such as updating the database, fails. Gets the attempted operation. Represents an exception that is thrown at run time when C1DataObjects encounters errors in the schema specified in a component. Most of such errors can be detected at design time performing schema verification (select Verify schema from the Schema menu in Schema Designer). Gets the name of the schema object where the error is found. Gets the type name of the schema object where the error is found. Represents an exception that is thrown on attempt to perform an operation that cannot be performed. Represents an exception that is thrown on attempt to perform an operation that, although not explicitly disabled by property settings, cannot be performed on the specified object in its current state with specified arguments. Represents a exposed to data bound controls. The corresponding object can be obtained as DataItem.DataRow. Alternatively, the same objects can be obtained as (dataItem). Gets the object represented by this data item. Gets or sets the data stored in a specified field. The zero-based index of the field. An Object that contains the data. Gets or sets the data stored in a specified field. The name of the field. An Object that contains the data. Gets the current state of the object represented by this data item. Represents a table or table view rowset filled with data. Provides programmatic access to table view or table data. To obtain a C1DataTable object, use or collection property of a component. How to Access Table Data How to Access Table View Data Adds a new row to the data table. This method creates a new empty row and adds it to the data table. The new row is filled only with default values, its primary key undefined. A row with undefined primary key is in a special transitory state called detached, the process of adding this row to the rowset is yet incomplete. For example, such row will not be sent to the database for update. A row becomes a full-fledged table row only after its primary key is set and any fields with = False are set too. Adding Rows and Primary Keys Refreshes field values in all data table rows and notifies data bound controls that the rows have changed. This method performs for every field in every row that has non-empty collection. Normally, calculations are performed automatically, without explicit Refresh call, when calculation arguments change. However, some calculation arguments changes cannot be detected automatically, for example, changes in Current, Original or BeforeChange field values, see C1DataObjects Expressions. Calling the Refresh method is also necessary when you use the property of a data set, to notify data bound controls that row values have changed. Gets an array of objects that contain errors. Computes an aggregation expression on the rows that satisfy a filter condition. This function computes aggregation expressions only. For example, you can use it to compute a sum of a field over rows, as in Sum(Quantity) (correct), but not to compute an expression depending on multiple fields in a single row, as in UnitPrice * Quantity (incorrect). For computations involving multiple fields in a single row use field . Commits all changes made to the table since it was filled with data or the last time AcceptChanges or was called. This method accepts changes in one simple table or simple table view, whereas method accepts changes in the whole data set. This method cannot be applied to composite tables. Also, it is not allowed to apply this method to a simple table that is used in a composite table as a main constituent table (is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). If one of these restrictions is not satisfied, the method throws an exception. In such case, use for the whole data set. Rolls back all changes made to the table since it was filled with data or the last time or RejectChanges was called. This method rolls back changes in one simple table or simple table view, whereas method rolls back changes in the whole data set. This method cannot be applied to composite tables. Also, it is not allowed to apply this method to a simple table that is used in a composite table as a main constituent table (is connected to its parent in the composite table diagram with a one-to-many relation; the restriction does not apply to those connected many-to-one). If one of these restrictions is not satisfied, the method throws an exception. In such case, use for the whole data set. If the value of the property was overridden in the C1DataTable, this method switches C1DataTable to the CaseSensitive property of the owner . If the value of the property was overridden in the C1DataTable, this method switches C1DataTable to the SortComparisonMode property of the owner . Gets the data set this data table belongs to. Gets a or schema object representing the schema of this data table. Gets the name of the data table. This property is used to return this data table from the C1DataSet object's two data table collections, and . This run-time property returns the collection of rows belonging to this data table. This run-time property returns the collection of fields in the data table. Gets a collection of custom user information associated with the data table. This property allows you to store arbitrary custom information with the object. Determines the locale information used in string comparisons within the data table. This property affects string comparison in expression evaluation, sorting table views by the end user (via IBindingList.ApplySort) and sorting in objects. By default, all C1DataTable objects created by a use the Locale property of the , but it can be overridden setting the Locale property of the C1DataTable object. C1DataObjects Expressions Determines whether string comparisons within the data table are case-sensitive. This property affects string comparison in expression evaluation, sorting table views by the end user (via IBindingList.ApplySort) and sorting in objects. By default, all C1DataTable objects created by a use the CaseSensitive property of the , but it can be overridden setting the CaseSensitive property of the C1DataTable object. Determines the type of string comparison within the data table. This property affects string comparison in expression evaluation, sorting table views by the end user (via IBindingList.ApplySort) and sorting in objects. By default, all objects created by a C1DataSet use the SortComparisonMode property of the C1DataSet, but it can be overridden setting the property of the object. C1DataObjects Expressions Gets a value indicating whether there are errors in any of the rows of this data table. To get all errors, use the method. Gets an array of fields that function as primary key of this data table. Table Properties Gets the ADO.NET DataTable storing data rows for a simple table. This data table belongs to the ADO.NET data set C1DataSet.StorageDataSet. This property returns a non-null value only for C1DataTable objects representing simple tables. For C1DataTable objects representing composite tables and table views, this property returns null (Nothing in Visual Basic). C1DataObjects and ADO.NET Working with ADO.NET Dataset Gets or sets fetch order of the data table representing a table view rowset. This property is used to modify fetch order dynamically in the event when this event is fired with empty an TableView argument before fetching any table views. For example: Visual Basic: Private Sub DataSet_BeforeFetch(ByVal sender As Object, ByVal e As C1.Data.FetchEventArgs) Handles DataSet.BeforeFetch If e.TableView Is Nothing Then e.TableViews("maindata").FetchIndex = 0 End If End Sub C#: private void dataset_DataSet_BeforeFetch(object sender, C1.Data.FetchEventArgs e) { if (e.TableView == null) e.TableViews["maindata"].FetchIndex = 0; } Delphi: procedure TForm.dataset_BeforeFetch(sender: System.Object; e: C1.Data.FetchEventArgs); begin if e.TableView = nil then e.TableViews['maindata'].FetchIndex := 0; end; If you only need to modify fetch order statically, it is easier to do it setting the property in Schema Designer. Possible values: from 0 up to the number of table views in the dataset. Represents a field of a , an item of the collection. Data table fields correspond to schema fields, objects of the corresponding schema table or table view. The DataField class contains only a few most important field properties. To access other field property values, use the schema accessible through the property. Gets the schema object on which the field is based. Data table fields correspond to schema fields, C1.Data.SchemaObjects.Field objects of the corresponding schema table or table view that can be accessed through the SchemaTable property of the . Gets the name of the field in the . This property is used to return this data field from the object's collection. Gets the type of field data. Gets the to which the field belongs. Gets the position of the field in the . This property is used to return this data field from the object's collection. Gets a collection of custom user information associated with the data set. This property allows you to store arbitrary custom information with the object. Gets the ADO.NET DataColumn object storing this field's data. The DataColumn belongs to the table . This property returns a non-null value only for fields of C1DataTable objects representing simple tables. For objects representing composite tables and table views, this property returns null (Nothing in Visual Basic) for all fields. C1DataObjects and ADO.NET Working with ADO.NET Dataset Represents a collection of objects, fields of a . Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Returns the zero-based index of the first occurrence of a value in the collection. The of the element. The search is not case-sensitive. The zero-based index of an element, if found; otherwise, -1. Gets the total number of elements in a collection. Gets the element of the collection at the specified index. The zero-based index of the element. Gets the element of the collection at the specified index. The of the element. Represents a collection of rows in a object. Copies elements of the collection to an array starting at a particular array index. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in array at which copying begins. Determines the index of a specific item in the collection, return -1 if this item not found. The object to locate in the collection. Returns True if the collection contains the specific item, False otherwise. The object to locate in the collection. Gets the row specified by the primary key value. This method returns the C1DataRow object containing the primary key values specified; otherwise a null value if the primary key values do not exist in the C1DataRowCollection. To use the Find method, the object must have at least one field designated as a primary key field, see PrimaryKey property. The primary key value of the row to find. The object. Gets the row specified by the primary key value. An array of primary key values to find. The object. Gets the total number of rows in the data table. Gets the row at the specified index. UnboundDataReader is a helper class used in supporting unbound tables in the event. The data is passed to its constructor in a System.Data.DataTable object. It implements the System.Data.IDataReader interface. Bound, SQL-Based and Unbound Tables Initializes a new instance of the UnboundDataReader class. System.Data.DataTable object with data rows. Initializes a new instance of the DbTableField class. Gets or sets the System.Data.DataTable object that contains data rows for this data reader. Specifies the conditions for enabling caching. Global caching for this data set is enabled only in WebForms. Global caching is disabled for this data set. Reserved for future use (in current version this value is equivalent to InWebForms) Specifies storage type for saving data. For Memory storage type, storing data in the cache depends on the session state mode for which your web application is configured. If SessionStateMode = InProc, in global cache, the data is copied to a persistent object in memory. If SessionStateMode = InProc, in session cache, the data stays in the same object, no copying is necessary. If SessionStateMode = SqlServer, the data is copied to a persistent object in memory and then the object is persisted, saved in the state database. If SessionStateMode = StateServer, the data is copied to a persistent object in memory and then the object is remoted to the state server, where it stays in memory. The fastest caching mode is using Memory storage type in session cache when your application is configured for SessionStateMode = InProc. In this case, saving and restoring data in cache is virtually immediate, because it does not involve copying any data, even in memory, it just stores a reference to an internal object. If you use SessionStateMode = StateServer or SqlServer with Memory storage type, C1WebDataObjects copies data in memory to make them persistent. This is also fast, but not immediate, depends on data size. Cached data stored in files on the server. Cached data stored in server memory. In InProc session state mode, it is always physical memory. In SqlServer session state mode, the actual storage can be a database where the memory-based data is persisted. In StateServer session state mode, it is still server memory, but data ends up on a different server, the state server. Specifies a restriction on fetched rows when a table view is filled with data. A filter condition specifies a restriction on fetched rows when a table view is filled with data, see Fill. For table views based on bound and SQL-based tables, a filter condition has SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition ( = True) which can be an arbitrary string for use in event. For table views based on unbound tables, filter conditions are arbitrary strings that can be used by event code implementing the fetch. See Bound, SQL-Based and Unbound Tables for details. Initializes a new instance of the FilterCondition class. The table view to which the conditions belongs. The text of the condition Initializes a new instance of the FilterCondition class. The table view to which the conditions belongs. The text of the condition A value indicating whether the condition is custom. If this parameter is set to True, the condition is ignored in SQL generation, does not generate an SQL condition, can be used in the event. Initializes a new instance of the FilterCondition class. Data set to which the condition applies. This parameter can be null, which means the data set will be determined later, when the filter condition is used in call. The name of the table view to which the conditions applies. The text of the condition. A value indicating whether the condition is custom. If this parameter is set to True, the condition is ignored in SQL generation, does not generate an SQL condition, can be used in the event. Initializes a new instance of the FilterCondition class. Data set to which the condition applies. This parameter can be null, which means the data set will be determined later, when the filter condition is used in call. The name of the table view to which the conditions applies. The text of the condition. Initializes a new instance of the FilterCondition class. Gets the table view () to which the filter condition belongs. Each filter condition represents a restriction on one of the data set table views. Gets or sets the text of the condition. Filter conditions have SQL WHERE syntax with bracketed table view field names as variables (example: [CustomerID] = 'ALFKI'), except for a custom filter condition (IsCustom = True), which can be an arbitrary string for use in event. Gets value indicating whether it is a custom condition. A custom filter condition is an arbitrary string. Custom filter conditions are ignored in SQL generation, do not generate SQL conditions. They are intended for use in in cases where it is needed to pass custom information to that event. Gets or sets the sort field or fields, and sort order for filling a table view with data. By default, fetched data is sorted according to the property, or by primary key if is empty. This default order can be overridden at run time, when calling by specifying the required sort order in one of the filter conditions passed to the method as a parameter. Set this property to the sort field name(s). To specify sort order (ascending/descending), add "ASC" (ascending) or "DESC" (descending) after the field name. If no order is specified, the order is "ASC" (ascending). Multiple field names are separated with commas. Example: "CustomerID DESC, OrderID". Fill sort can be set for any filter condition filtering the given table view, or a special filter condition can be created for this purpose (if there are no filtering conditions for this table view), with = True and empty . Note that in virtual mode ( property set to a mode other than Static) FillSort, both in filter conditions and in class, must form a unique key. If it does not represent a unique key, a run time exception will occur when two different row with equal key values are fetched in virtual mode. You can always ensure uniqueness of a sort order by adding primary key fields in the end. Represents a collection of objects. This interface is used to allow objects and collection to serialize types of their members in a custom way. If a collection implements this interface, TypeToString is invoked during serialization of collection items, and for all items for which it returns a non-null string, that string is used as the element name of the item. If a class implements this interface, AND a member of that class has attribute TypeNameSerialization.Custom, AND does not have attribute XmlAttribute (i.e. is serialized as an element), TypeToString is invoked on the owner when that member is serialized, and if that returns a non-null string, that string is used as the value of TypeName attribute. When deserializing a collection which implements this interface, StringToType is invoked for each new item in the collection, and if that returns a non-null type, that type is used to create the item. Otherwise, TypeNameSerialization attribute is used. When deserializing a class which implements this interface, StringToType is invoked on that class for members with TypeNameSerialization.Custom attribute set. Returns a string representing the type of the object Returns the type restored from the serialized string Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Returns the zero-based index of the filter condition object in the collection. The Object to locate in the collection. The zero-based index of the filter condition object, if found; otherwise, -1. Determines whether an element is in the collection. The Object to locate in the collection. True if the filter condition object is found in the collection; otherwise, False. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Gets the element of the collection at the specified index. A RemoteDataService-derived class is included in every data library. It is used to support automatic remoting in methods C1DataSet.Fill/Update. Calling C1DataSet.Fill/Update on the client automatically calls RemoteDataService.Fill/Update on the server. RemoteDataService.Fill/Update are virtual methods that can be overridden to customize Fill/Update behavior. Also, new "business" methods can be added to the RemoteDataService-derived class, see Business Methods. Called on the server when C1DataSet.Fill is called on the client. Data set to be filled with data. This data set is initially empty. After this data set is filled, its data is passed to the client to the data set for which was called. Filter conditions used in call. Connection object substitutes defined in property. This parameter is set to False by default. It means C1DataObjects does not use transactions in fetching data. To make it perform fetch in a transaction, override this method and set this parameter to True. Called on the server when C1DataSet.Update is called on the client. Data set containing simple table rows. Only rows with C1DataRow.RowState equal to Added, Deleted or Modified need to be updated to the database. After database update, simple table rows in this data set are passed back to the client to refresh the data set for which C1DataSet.Update was called. Connection object substitutes defined in property. This parameter is set to True by default. It means C1DataObjects performs inside a database transaction. To make it perform Update without using a database transaction, override this method and set this parameter to False. This is needed to support distributed transactions, see Supporting distributed (COM+) transactions. Specifies the database engine software used to connect to the database. A custom, generic ADO.NET data provider, see class C1CustomConnection. Connection using OLE DB database access classes in System.Data.OleDb namespace. Connection using SQL Server native database access classes in System.Data.SqlClient namespace. Connection using SQL Server Compact native database access classes in System.Data.SqlServerCe namespace. Connection using Oracle Data Provider for .NET, namespace Oracle.DataAccess.Client. Connection using Microsoft .NET Framework Data Provider for Oracle, namespace System.Data.OracleClient.OracleType. Base class representing a database connection. C1DataObjects supports five types of database connections: OLE DB connection (connecting to any database that has an OLE DB provider), represented by a derived class, native SQL Server connection, represented by a derived class, two native Oracle connection types ( and ), and any other .NET data provider is represented by the class. Database Connections Native and OLE DB Database Access Creates a copy of the connection object, with the same Name and other properties. A new connection object that is a copy of this instance. Initializes a new instance of the Connection class. Schema to which this connection object belongs. Opens database connection. Closes database connection. Starts a transaction on the connection object. Commits the current transaction. Rolls back the current transaction. Gets the schema to which the connection object belongs. Gets or sets the name of the connection object. Gets or sets the wait time before terminating an attempt to execute a command and generating an error. The default is 30 seconds. Gets the object containing information about SQL dialect supported by the connection. Use the properties of this object to specify various options of SQL syntax relevant to C1DataObjects that can vary between different databases. Normally, these properties are set automatically to their appropriate values, according to the selected or OLE DB provider (when you specify the ), but, occasionally, they may need manual adjustment, for example, when using a third-party OLE DB provider or a custom .NET data provider. Gets .NET IDbConnection object representing open connection. This property returns a non-null object only while the connection is open. Depending on the value, DbConnection returns an object of one of the following classes: for OleDb: System.Data.OleDb.OleDbConnection, for SqlServer: System.Data.SqlConnection, for Oracle: Oracle.DataAccess.Client.OracleConnection, for MSOracle: System.Data.OracleClient.OracleConnection, for others (Custom): the type is specified in the ConnectionTypeName property. Gets .NET IDbTransaction object representing current transaction. This property contains a non-null object only while the database connection is open and is performing a transaction while updating the database. Depending on the value, DbTransaction returns an object of one of the following classes: for OleDb: System.Data.OleDb.OleDbTransaction, for SqlServer: System.Data.SqlTransaction, for Oracle: Oracle.DataAccess.Client.OracleTransaction, for MSOracle: System.Data.OracleClient.OracleTransaction, for others (Custom): type depends on the provider. Gets or sets the string used to connect to a database. Connection string includes provider name (only for OLE DB connections), data source name, database name, connection timeout, user ID, password and other required and optional parameters for establishing database connection. It contains all information necessary to open the database. Gets the type of database connection, either via OLE DB or using one of the native database access options. This property is overridden in each class derived from Connection, indicating the type of database connection the class represents. Native and OLE DB Database Access Gets or sets a description for the connection. This value is displayed in the Schema Designer's Information window when you select the connection. Represents a collection of objects. Returns the zero-based index of the connection with a given name in the collection. The of the element. The search is not case-sensitive. The zero-based index of the connection with a given name, if found; otherwise, -1. Returns the zero-based index of the connection object in the collection. The element of the collection. The zero-based index of an element, if found; otherwise, -1. Determines whether an element is in the collection. The of the element. The search is not case-sensitive. True if connection with a given name is found in the collection; otherwise, False. Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Gets the element of the collection at the specified index. Gets the element of the collection at the specified index. Represents an OLE DB connection to a database, using OLE DB Data Provider for .NET, classes from namespace System.Data.OleDb. Database Connections Native and OLE DB Database Access Initializes a new instance of the C1OleDbConnection class. Schema to which this connection object belongs. Initializes a new instance of the C1OleDbConnection class. In this class this property returns .OleDb. See the Property. Represents a connection to a database, using SQL Server Data Provider for .NET, classes from namespace System.Data.SqlClient. Database Connections Native and OLE DB Database Access Initializes a new instance of the C1SqlServerConnection class. Schema to which this connection object belongs. Initializes a new instance of the C1SqlServerConnection class. In this class this property returns .SqlServer. See the Property. Represents a connection to a database, using Data Provider for Microsoft SQL Server Compact, classes from namespace System.Data.SqlServerCe. Database Connections Native and OLE DB Database Access Initializes a new instance of the C1SqlServerConnection class. Schema to which this connection object belongs. Initializes a new instance of the C1SqlServerConnection class. In this class this property returns .SqlServerCe. See the Property. Represents a connection to a database, using Oracle Data Provider for .NET, classes from namespace Oracle.DataAccess. Initializes a new instance of the C1OracleConnection class. Schema to which this connection object belongs. Initializes a new instance of the C1OracleConnection class. In this class this property returns .Oracle. See the Property. Represents a connection to a database, using Microsoft .NET Framework Data Provider for Oracle, classes from namespace System.Data.OracleClient. Database Connections Native and OLE DB Database Access Initializes a new instance of the C1MSOracleConnection class. Schema to which this connection object belongs. Initializes a new instance of the C1MSOracleConnection class. In this class this property returns .MSOracle. See the Property. Represents a connection to a generic ADO.NET data provider. Initializes a new instance of the C1CustomConnection class. Schema to which this connection object belongs. Initializes a new instance of the C1CustomConnection class. Gets the object containing information necessary to access a generic .NET data provider. Using Other (Custom) .NET Data Providers Native and OLE DB Database Access Database Connections In this class this property returns .Custom. See the Property. Containing information necessary to access a generic .NET data provider. Using Other (Custom) .NET Data Providers C1CustomConnection.CustomProviderInfo Property Gets or sets the name of the assembly implementing the .NET data provider. Gets or sets the full name of the type implementing the IDbConnection interface. Gets or sets the full name of the type implementing the IDbCommand interface. Gets or sets the full name of the type implementing the IDbDataParameter interface. Gets or sets the full type name of the native database type enumeration. Gets or sets the full name of the type implementing the IDbDataAdapter interface. Gets or sets the name of the property of the parameter class specifying parameter native data type. Gets or sets a format string used to generate parameter names in SQL statements from parameter number {0} and name {1}. Generating SQL statements, C1DataObjects uses this format string to generate parameter names in the SQL statement. For example, for a SQL Server database, the string can be "@{1}", which will generate parameters like this: SELECT ... FROM ... WHERE ... = @aName SQL Server accepts named parameters, so we can use the suggested name (parameter name, {1}) in the SQL statement. Suggested name is usually based on a field name, but it is generally at C1DataObjects discretion. Another possible option for SQL Server can be "@Par{0}", which ignores the suggested name and uses the (unique) parameter number to generate parameter names in the SQL statement. For an Oracle database, a correct format string can be ":{1}" or ":Par{0}". Gets or sets a format string used to generate the value of parameter.ParameterName from parameter number {0} and name {1}. Generating SQL statements and corresponding commands, C1DataObjects uses this format string to create names to assign to command parameter Name property (IDbDataParameter.Name). For example, for a SQL Server database, the string can be "@{1}" or "@Par{0}". The latter ignores the suggested name and uses the (unique) parameter number to generate the parameter Name property value. For an Oracle database, examples of a correct format string are "{1}" or "Par{0}". Specifies how data is fetched from the database to a table view. Virtual Mode - Dealing with Large Datasets All data is pre-fetched when the data set is filled with data. No fetches occur until method is called. Data is fetched in segments of limited size, and the number of segments cached at the client at any given time is limited, segments are uncached when this limit is exceeded. Data is fetched in segments, and the number of segments in the cache is unlimited, and, in addition to that, fetch is continually performed in background mode until all data is fetched. Data is fetched in segments of limited size, and the number of segments in the cache is unlimited, segments are never uncached. Base class for data set diagrams () and composite table diagrams (). Initializes a new instance of the Diagram class. Initializes a new instance of the Diagram class. Gets the schema the diagram belongs to. Gets or sets the name of the diagram object. Gets the collection of table views. Gets the collection of view relations. Represents a data set definition. Initializes a new instance of the DataSetDef class. Schema the dataset belongs to. Initializes a new instance of the DataSetDef class. This property is used in ComponentOne WebDataObjects for data caching in web applications. It is ignored if the schema is used in WinForms application or in WebForms application without WebDataObjects. Gets the object containing default settings used for fields accessed through this data set. Gets or sets a description for the dataset. The CacheProperties class is used to specify global cache settings for a DataSetDef using the property. Gets or sets the maximum number of data set objects that can be used simultaneously for fetching data by different threads on a server. PoolSize = 0 means object pool is disabled. Gets or sets the number of seconds to wait while all existing data set objects are busy serving other threads on the server and a new object cannot be created because there the PoolSize limit is already reached. PoolTimeout = 0 means wait indefinitely. Gets or sets a value indicating under what conditions caching is enabled. Gets or sets the storage medium used to cache data. Gets or sets a value indicating whether the data in cache should be compressed. Gets or sets the path for storing cache data files, if = File. Gets or sets the maximum number of data sets that can be stored in the cache for this DataSetDef. Gets or sets the storage medium used to cache changes made by the user. Gets or sets a value indicating whether the cached changes should be compressed. Gets or sets the path for storing cached changes, if ChangesCacheMode = File. Contains various default settings used for fields accessed through a certain data set. Table Fields Initializes a new instance of the FieldDefaults class. Gets or sets a value indicating whether DbNull values of string fields are returned as empty strings. If is set to Default (default option for a field), the value of this property, defined in , takes effect for the field. Table Fields Gets or sets a value indicating whether empty strings are stored as DbNull values. If is set to Default (default option for a field), the value of this property, defined in , takes effect for the field. Table Fields Represents a composite table definition diagram. Gets the composite table the diagram belongs to. Gets the collection of table views. Gets the collection of view relations. Represents a collection of objects. Gets the index of the element with a given name in the collection. The of the element. The search is not case-sensitive. The zero-based index of an element, if found; otherwise, -1. Gets the index of an element in the collection. The element of the collection. The zero-based index of an element, if found; otherwise, -1. Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Determines whether an element is in the collection. The of the element. The search is not case-sensitive. True if element is found in the collection; otherwise, False. Gets the element of the collection at the specified index. The zero-based index of the element. Gets the element of the collection at the specified index. The of the element. The search is not case-sensitive. Represents a collection of objects. Returns the zero-based index of the relation with a given name in the collection. The of the element. The search is not case-sensitive. The zero-based index of an element, if found; otherwise, -1. Returns the zero-based index of an element in the collection. The relation object to locate in the collection. The zero-based index of an element, if found; otherwise, -1. Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Determines whether an element is in the collection. The of the element. The search is not case-sensitive. True if element with a given name is found in the collection; otherwise, False. Gets the element of the collection at the specified index. The zero-based index of the element. Gets the element of the collection at the specified index. The of the element. The search is not case-sensitive. Objects of the TableView class represent nodes in a data set definition diagram. Objects of the derived class represent nodes in a composite table definition diagrams. For both kinds of table views, every table view object is based on a table object. Base class for all tables and table views. Gets or sets a value indicating whether modifying table data is allowed. Gets the effective value of the property at run time. Although a table view's property may be False, it will behave as if it is True if it is based on a table with = True. Gets or sets a value indicating whether modifying table data in bound controls is allowed. Gets the effective value of the property at run time. Gets or sets a value indicating whether adding new rows to the table is allowed. Gets the effective value of the property at run time. Although a table view's property may be True, it will behave as if it is False if it is based on a table with = False. Gets or sets a value indicating whether deleting rows from the table is allowed. Gets the effective value of the property at run time. Although a table view's property may be True, it will behave as if it is False if it is based on a table with = False. Gets the collection of record level constraints. Gets the collection of field level constraints. Gets the name(s) of the table primary key field(s). This property returns a comma-delimited string consisting of the names of one or more fields whose property is set to True. Gets or sets the table name. Gets or sets a class representing rows of this table or view. This property allows you to define a custom class representing rows of a table or table view. By default, row objects are represented by the C1DataRow class. To define a custom class, do the following: 1. In the data library dll, define a class derived from C1DataRow. 2. In the C1SchemaDef.CreateSchema event, assign this class to Table.RowType or TableView.RowType property. If the RowType property is set for a table, simple or composite (DbTable or CompositeTable), all TableView objects based on this table will automatically use the same class, unless their RowType property is set explicitly, in which case TableView.RowType overrides the table setting. Gets or sets a description for the table. This value is displayed in the Schema Designer's Information window when you select the table or table view. Initializes a new instance of the TableView class. Diagram the table view belongs to. Table the table view is based on. Custom row's prototype. Initializes a new instance of the TableView class. Diagram the table view belongs to. Table the table view is based on. Initializes a new instance of the TableView class. Retrieves table view fields from table specified in the Table property. Gets the diagram this table view belongs to. Gets the table this table view is based on. Gets or sets the name of the table view. Gets or sets the sort field or fields, and sort order for filling the table view with data. This property controls the order in which data rows are sorted after fetch. By default, fetched data is sorted by primary key. If a different sort is required, set this property to the sort field name(s). To specify sort order (ascending/descending), add "ASC" (ascending) or "DESC" (descending) after the field name. If no order is specified, the order is "ASC" (ascending). Multiple field names are separated with commas. Example: "CustomerID DESC, OrderID". Gets or sets a value indicating whether this table view is skipped when the data set is filled with data. The default value is False. If this property is set to True, this table view data is not fetched from the database when the data set is filled with data. Gets or sets a value indicating whether must be called automatically for newly added rows once their primary key is defined. Gets the field collection of the table view. Gets or sets a value specifying how data is fetched from the database to the table view. The default value is Static. The other three possible values specify a virtual fetch mode, where data is fetched in chunks (segments) allowing to work with large datasets. Gets or sets the maximum number of segments in the cache in virtual mode. This property has effect only when is set to Virtual. It is a performance tuning property. Do not change the default value unless you thoroughly understand the mechanics of virtual mode. The default value is 4. Gets or sets the size (number of rows) of a segment of rows fetched from the database in virtual mode. This property has effect only in virtual mode (when is not Static). It is a performance tuning property. Do not change the default value unless you thoroughly understand the mechanics of virtual mode. The default value is 400. Gets or sets a percent value from 0 to 100 determining (in virtual mode) the distance to the end of a segment that is considered a 'preemptive fetch zone'. This property has effect only in virtual mode (when is not Static). It is a performance tuning property. Do not change the default value unless you thoroughly understand the mechanics of virtual mode. The default value is 30%. This property determines the distance (number of rows) to the end of a segment that is considered a 'preemptive fetch zone', in the sense that a new segment must be fetched from the database (if not found in the cache) when the user positions on a row inside that zone. By default, it is 30% of 400 = 120 rows. Gets or sets a percent value from 0 to 100 determining (in virtual mode) the distance to the end of a segment that is considered a 'mandatory fetch zone'. This property has effect only in virtual mode (when is not Static). It is a performance tuning property. Do not change the default value unless you thoroughly understand the mechanics of virtual mode. The default value is 12%. This property determines the distance (number of rows) to the end of a segment that is considered a 'danger zone', or a 'mandatory fetch zone', in the sense that the current segment must be changed to another segment (taken from the cache or fetched from the database) when the user positions on a row inside that zone. By default, it is 12% of 400 = 48 rows. Gets or sets a value indicating (in VirtualAutomatic mode) whether the table view rebuilds its rowset after all rows are fetched. This property has effect only in virtual automatic mode (when = VirtualAutomatic). This property is used in ComponentOne WebData for data caching in web applications. It is ignored if the schema is used in WinForms application or in WebForms application without WebDataObjects. Gets or sets a value indicating whether table view is used for data binding (shown in the DataMember property of bound controls). The default value of this property is True. If this property is set to False, the table view will be available only programmatically (through the C1DataSet.TableViews[] collection), but data binding will not see it. A data bound control, such as a grid, has only table views with ExposedInBinding=True available for selection in its DataMember property for data binding. Use this property to hide table views that you only need programmatically and do not need to appear in bound controls for the end user. This property shows/hides individual objects in data binding. If you need to show/hide a whole path of TableView objects, use the property. Gets or sets fetch order of the table view. This property allows you to change the order in which table views in the dataset are fetched. Controlling fetch order can be necessary, for example, if you have both bound and unbound or SQL-based tables in one dataset. You can set TableView.FetchIndex at design time in the Schema Designer or programmatically at run time, in the event. Possible values: from 0 up to the number of table views in the dataset. Represents a node in a composite table definition diagram. It is a table view, based on a table object, one of constituent tables. Composite Table Diagram Initializes a new instance of the CompositeDefView class. Diagram the table view belongs to. Table the table view is based on. Custom row's prototype. Initializes a new instance of the CompositeDefView class. Diagram the table view belongs to. Table the table view is based on. Initializes a new instance of the CompositeDefView class. Gets or sets the alias used for this table view in the SQL statement generated for fetching rows into the composite table. The default value is empty string. Generated SQL statement must use aliases for constituent simple tables, because a table can occur more than once in a composite table diagram, so its name may be not unique in the statement, in which case it needs aliasing. By default, view table names are used as aliases, but if you want to change the default alias, you can set it. This is rarely needed, this property is supported only for completeness, since all other names in the generated SQL statement can be controlled by developers using and . How Composite Table Data is Fetched, Stored and Updated Represents a view relation, an arc in a . A view relation between two table views is always based on a Relation between two tables. View Relations Initializes a new instance of the ViewRelation class. Diagram to which this view relation belongs. Relation between tables on which this view relation is based. Initializes a new instance of the ViewRelation class. Gets the diagram this view relation belongs to. View Relations Gets or sets the relation between tables this view relation is based on. View Relations Gets or sets the name of the view relation. View Relations Gets or sets the parent table view. If the view relation is inverted with respect to the table relation on which it is based, the view relation's is based on the table relation's , and the view relation's is based on the table relation's . View Relations Gets or sets the child table view. If the view relation is inverted with respect to the table relation on which it is based, the view relation's is based on the table relation's , and the view relation's is based on the table relation's . View Relations Gets view relation cardinality, which is determined by the relation cardinality with possible inversion. A view relation, as an arc in the data set diagram, can have direction opposite to the direction of the table relation on which it is based. For example, having a one-to-many relation Customers - Orders, we can create a many-to-one view relation Orders - Customers, based on Customers - Orders, but in inverse order (direction). So, if the object Customers - Orders has = Customers, = Orders, the view relation, if inverted, will have = Orders, = Customers. View Relations Gets or sets a value indicating whether relation is specified in code in and events (and not based on a between tables). If this property is set to True, the view relation is not based on a table relation (its property is ignored), it is defined by custom code returning the list of child rows for a parent row in event (in C1DataExpress, C1ExpressConnection.GetChildRows). Only view relations (only relations between table views, not relations between tables) can be custom (have this property set to True). Furthermore, custom relations are allowed only in data set diagrams, not in composite table diagrams. You can define custom relations between table views based on composite tables, but cannot use custom relation inside a composite table diagram. Related topic: View Relations For a relation specified in code in GetChildRows event, indicates whether GetParentRow is not available. This property has effect only for custom relations, those defined in code, with =True. If this property is set to True, code in event can be omitted, calling for this relation will throw exception. Set this property to True if it is difficult or simply unnecessary to reverse your algorithm enumerating child rows. Note that only is used for master-detail data binding, is not necessary. In C1DataExpress, OneWay is always True for custom relations. View Relations Gets or sets a value indicating whether relation is used for data binding (shown in the DataMember property of bound controls). Default: True. If this property is set to False, the relation will be available only programmatically (through the method and typed business logic methods), but data binding will not see it. A data bound control, such as a grid, has only relations with ExposedInBinding=True available for selection in its DataMember property for data binding. Use this property to hide relations that you only need programmatically, do not need to appear in bound controls for the end user. In C1DataExpress, the value of the ExposedInBinding property is determined by the Master-detail check box in the Relations editor. If the check box is unchecked, ExposedInBinding=False. Gets or sets a description for the view relation. This value is displayed in the Schema Designer's Information window when you select the relation. Represents an arc in a composite table definition diagram. It is a view relation, based on a table relation between two constituent tables. Composite Table Diagram View Relations Initializes a new instance of the CompositeDefRelation class. Diagram to which this view relation belongs. Relation between tables on which this view relation is based. Initializes a new instance of the CompositeDefRelation class. Gets or sets a value indicating whether to use outer join in generated SQL , if = ManyToOne. This property has effect only for many-to-one relations ( = ManyToOne). The default value is True. This means that a many-to-one relation in a composite table diagram generates outer joins in the SQL statement. This ensures the standard interpretation of many-to-one links, where the child table contains one row corresponding to the parent row, or none. If there are no corresponding row, the child fields receive null values. However, some databases do not implement outer joins, or implement them inadequately, with various limitations (as, for example, MS Access). In this case, and when outer joins are undesirable for other reasons, you can set this property to False. Then C1DataObjects will use inner join for this view relation in the composite table diagram. How Composite Table Data is Fetched, Stored and Updated Represents a collection of objects. Returns the zero-based index of the field with a given name in the collection. The of the element. The search is not case-sensitive. The zero-based index of an element, if found; otherwise, -1. Returns the zero-based index of a field in the collection. The field object to locate in the collection. The zero-based index of an element, if found; otherwise, -1. Determines whether an element is in the collection. The of the element. The search is not case-sensitive. True if field with a given name is found in the collection; otherwise, False. Adds a new element to the collection. The object to be added to the end of the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Gets the element of the collection at the specified index. The zero-based index of the element. Gets the element of the collection at the specified index. The of the element. The search is not case-sensitive. Gets the table view to which the collection belongs. Specifies how a table is related to the database. Bound, SQL-Based and Unbound Tables Table is based on a database table, SQL statements generated automatically. SQL statements specified in user code. Fetch and update performed entirely in user code. Specifies which field values participate in locating the database record for update. Generated SQL Statements All field values in the database record must match the original row values. Primary key field values in the database record must match the original row values. Primary key field values and those field values that have changed from their original values must match the original row values. Specifies how refresh after update is done. Changing Data as a Result of Update (Refresh) Always retrieve the resulting database record after adding or modifying record in the database. Do not retrieve the resulting database record after adding or modifying record in the database. Try to retrieve the resulting database record after adding or modifying record in the database, but ignore errors if they occur. Base class for simple and composite tables. Simple Tables Composite Tables Gets the schema to which the table belongs. Gets the collection of table fields. Table Fields Gets or sets a value specifying which field values participate in locating the database record for update. Generated SQL Statements Gets or sets a value specifying how refresh after updating the database is done. Generated SQL Statements Gets or sets a value indicating whether the absence of a record to delete in the database is interpreted as an error. Generated SQL Statements Represents a collection of objects. Returns the zero-based index of the field with a given name in the collection. The of the element. The search is not case-sensitive. The zero-based index of an element, if found; otherwise, -1. Returns the zero-based index of a field in the collection. The field object to locate in the collection. The zero-based index of an element, if found; otherwise, -1. Determines whether an element is in the collection. The of the element. The search is not case-sensitive. True if field with a given name is found in the collection; otherwise, False. Adds a new element to the collection. The object to be added to the end of the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Gets the element of the collection at the specified index. Gets the element of the collection at the specified index. The of the element. The search is not case-sensitive. Gets the table to which the field collection belongs. Base class for simple tables. Represents a simple table. Simple Tables Initializes a new instance of the DbTable class. Schema the table belongs to. Custom class representing rows of a table or table view. Initializes a new instance of the DbTable class. Schema the table belongs to. Initializes a new instance of the DbTable class. Retrieves fields from the database table specified in property. property should be non-empty. Gets or sets the object used for the table. This property is null for an unbound table. Table Properties Bound, SQL-Based and Unbound Tables Gets or sets the name of a database table on which the table is based. Bound, SQL-Based and Unbound Tables Gets or sets the table data mode. Data mode is one of the values specifying whether a table is bound, SQL-based or unbound. Bound, SQL-Based and Unbound Tables Gets or sets the command text for fetching data used in = SqlBased. Property determines whether SelectCommandText is a SQL statement or a stored procedure name. If specified, /SelectCommandText determine the command that is executed to fetch data. The command can also be specified dynamically, in code, in or events. If property is set and its SelectCommand property is not empty, it supersedes the SelectCommandText property. The SelectCommandText property can be specified in a only for a SQL-based table ( = SqlBased). In C1DataExpress, in a C1ExpressTable component, specifying this property makes the table SQL-based and clears the DbTableName property. When this property is set at design time, and a database connection exists, fields are automatically retrieved from the database structure, with user confirmation if it is OK to delete the existing fields. C1ExpressTable Class Bound, SQL-Based and Unbound Tables Determines how to interpret in = SqlBased. This property determines whether is a SQL statement or a stored procedure name. C1ExpressTable Class Bound, SQL-Based and Unbound Tables Represents a composite table. Composite Tables Initializes a new instance of the CompositeTable class. Schema the table belongs to. Custom class representing rows of a table or table view. Initializes a new instance of the CompositeTable class. Schema the table belongs to. Initializes a new instance of the CompositeTable class. Gets the composite table definition diagram. Composite Table Diagram Gets or sets a value indicating whether constituent tables are allowed to use different connections. How Composite Table Data is Fetched, Stored and Updated Specifies whether field value is set in the database. Value is always assigned to the database field. Value is never assigned to the database field. Value is assigned to the database field if the value has been changed since it was fetched from the database. Specifies automatic assignment of field values on adding rows to a table and to the database. No autoincrement functionality. The field automatically receives incremented value in a new row added to the table on the client. The field automatically receives incremented value in a new row added to the database table on the server. The field automatically receives incremented value in a new row both in a new row added on the client and in a new row added to the database table on the server. These two values can be different. After adding the row to the database table on the server, the client value is refreshed with the value from the database table. An enumeration used in property values instead of the Boolean type where there is a default option (depending on the context) in addition to Yes (True) and No (False). Property value is True. Property value is False. This can be Yes or No depending on other properties of the object. Where Default is used, the value of the property is determined by some rules documented with the property. The base class for and . Contains common field properties. Gets or sets the name of the field. Table Fields Gets or sets the type of field data. Table Fields Gets or sets the field data type as a native data type of the underlying database. NativeDbType contains the numeric value corresponding to one of the values of the enumerated type describing all possible data types for the database access provider. These enumerations are: for OleDb: System.Data.OleDb.OleDbType, for SqlServer: System.Data.SqlDbType, for Oracle: Oracle.DataAccess.Client.OracleDbType, for MSOracle: System.Data.OracleClient.OracleType, for others (Custom): enumeration type is specified in the property. This property is used for database update, to specify the type of command parameters containing field values that are written to the database. Sometimes it is essential to specify the type for database update more exactly than it can be inferred from the .NET type of the field (from ). For example, DataType = String can be further specialized to be a Unicode or ASCII string. When you create a schema importing it from database structure, Field.NativeDbType is automatically set to the actual type of the database field. In those rare cases when you need to change it, you can set the Field.NativeDbType property to a specific native type you need, or you can use Field.NativeDbType = Any (-1) to indicate that inferring parameter type from is good enough (or not needed at all, as, for example, in calculated fields). Gets or sets a value indicating whether the field belongs to the table's primary key. Every modifiable (ReadOnly:Table set to False) table must have primary key, that is, at least one field with PrimaryKey property set to True. Primary key values must be unique in table rows, an attempt to set a duplicate primary key generates an exception. Table Fields Gets or sets a value indicating whether null or empty string values are allowed in this field. If this property is set to False, an attempt to assign null or empty string value to this field generates an exception. The effective value of this property at run time (see ) for fields based on other fields (composite table fields, table view fields) is False if the base field's property value is False, even though the property value itself is independent of the base field's property value. Table Fields Composite Table Fields Gets the effective value of the property at run time. Although a field's property may be True, it will behave as if it is False if the field is based on another field and that field's is set to False. The EffectiveAllowDbNull property allows you to get this effective value. A table view field is based on a table field if the table view field's property is not empty. A composite table field is based on a table field if the composite table field's property is not empty and is not empty. Table Fields Gets or sets whether this field has a default value in the database. If this property is set to True, an attempt to assign null or empty string value to this field of the newly added row will not generate an exception even if the AllowDbNull property is set to False for this field. Gets or sets a value indicating whether the values of this field in each row must be unique. If it is set to True, an attempt to assign a duplicate value to this field generates an exception. Table Fields Gets or sets a value indicating whether the field automatically receives an incremented value for a new row added to the table. The most common way of implementing the autoincrement functionality is using the ClientAndServer option. In this case, your database field must be an autoincrement field (an integer field having autoincrement functionality in the database), and C1DataObjects implements autoincrement functionality on the client. When a new row is added on the client, the field receives a negative autoincrement value (both and are equal to -1). C1DataObjects uses negative values on the client to ensure their uniqueness, to distinguish them from autoincremented values assigned by the database. When the new row is added to the database table on the server, C1DataObjects gets the autoincrement value assigned by the database and refreshes the field value on the client with this value. For this functionality to work with Oracle, Interbase and other databases that support sequence/generator objects, you must also set the property. Table Fields Keys Assigned by Server or Database Gets or sets the starting value for a field with value other than None. If = ClientAndServer, the values of the AutoIncrementSeed and properties are equal to -1, to distinguish client autoincrement values from those of the server, see . Table Fields Keys Assigned by Server or Database Gets or sets the name of a sequence or generator database object used for autoincrement on the server. This property is used to enable autoincrement key field functionality in Oracle, InterBase and other databases that support special database objects used to generate unique (autoincrementing) values. With SQL Server, Access and Sybase, the autoincrement (identity) is assigned automatically by the database and can be retrieved with a special SQL command, see the property. In Oracle and Interbase, setting the key value is not done automatically by the database. It can be done either automatically by C1DataObjects, if you set = BeforeInsertCommand, or by a trigger, in which case you set IdentityColumnRetrieveMode = AfterInsertCommand. In both cases, in addition to setting the IdentityColumnLastValueSelect property that retrieves the autoincremented value, you must set the AutoIncrementSequenceName property to the name of the object generating the value, a sequence in Oracle, a generator in Interbase. Table Fields Keys Assigned by Server or Database Gets or sets the increment for a field with value other than None. If AutoIncrement = ClientAndServer, the values of the and AutoIncrementStep properties are equal to -1, to distinguish client autoincrement values from those of the server, see . Table Fields Keys Assigned by Server or Database Gets or sets the maximum length of a string field, in characters. If the length is unlimited, the value is 0 (default). Table Fields Gets or sets the maximum number of digits used to represent the field value. Table Fields Gets or sets the number of decimal places to in the field value. Table Fields Gets or sets the default value for the field when creating new rows. Table Fields Gets or sets a value indicating whether modifications to field values are allowed. If this property is set to True, modifying this field's values is not allowed. The effective value of this property at run time (see ) for fields based on other fields (composite table fields, table view fields) is True if the base field's property value is True, even though the property value itself is independent of the base field's property value. Table Fields Gets the effective value of the property at run time. Although a field's ReadOnly property may be False, it will behave as if it is True if the field is based on another field and that field's ReadOnly is set to False. The EffectiveReadOnly property allows you to get this effective value. A table view field is based on a table field if the table view field's TableField property is not empty. A composite table field is based on a table field if the composite table field's TableViewField property is not empty and TableViewField.TableField is not empty. Table Fields Gets or sets a value indicating whether the user can change this field value using bound controls. Table Fields Gets the effective value of the UserReadOnly property at run time. Although a field's property may be False, it will behave as if it is True if the field is based on another field and that field's is set to False. The EffectiveReadOnly property allows you to get this effective value. A table view field is based on a table field if the table view field's TableField property is not empty. A composite table field is based on a table field if the composite table field's property is not empty and is not empty. Gets or sets a value indicating whether modifications to field values are allowed only in newly added rows. If this property is set to True, modifying this field's values is allowed only in newly added rows and that only while the row is in detached state ( not yet called, see Keys Assigned by Client: New Row Detached and Attached State) The effective value of this property at run time (see ) for fields based on other fields (composite table fields, table view fields) is True if the base field's property value is True, even though the property value itself is independent of the base field's property value. Keys Assigned by Client: New Row Detached and Attached State Table Fields Gets the effective value of the property at run time. Although a field's ReadOnlyUnlessNew property may be False, it will behave as if it is True if the field is based on another field and that field's ReadOnlyUnlessNew is set to False. The EffectiveReadOnly property allows you to get this effective value. A table view field is based on a table field if the table view field's TableField property is not empty. A composite table field is based on a table field if the composite table field's property is not empty and is not empty. Table Fields Gets or sets the expression producing the result of a calculation. The 's CalculationExpression property corresponds to the property of the first object in the collection. Since in most cases consists of a single calculation, this field property, together with 's and makes it easier to specify a single calculation for a field, without using the collection editor. Table Fields Gets or sets an optional Boolean expression defining applicability of a calculation. The 's CalculationCondition property corresponds to the property of the first object in the collection. Since in most cases consists of a single calculation, this field property, together with 's and makes it easier to specify a single calculation for a field, without using the collection editor. Table Fields C1DataObjects Expressions Gets or sets a value indicating whether calculation triggers the same events as field modification by the user. The Field's CalculationFireEvent property corresponds to the property of the first object in the collection. Since in most cases consists of a single calculation, this field property, together with 's and makes it easier to specify a single calculation for a field, without using the collection editor. Table Fields Gets or sets the Boolean expression used to test a constraint. The Field's ConstraintExpression property corresponds to the Expression property of the first object in the collection. Since in many cases consists of a single constraint, this field property, together with Field's and makes it easier to specify a single constraint for a field, without using the collection editor. Gets or sets an optional Boolean expression defining applicability of a calculation. If this expression is empty or evaluates to True, the is evaluated and assigned to the field. If it evaluates to False, this calculation is skipped. The Field's CalculationCondition property corresponds to the Condition property of the first object in the collection. Since in most cases consists of a single calculation, this field property, together with Field's and makes it easier to specify a single calculation for a field, without using the collection editor. Gets or sets the string used as the error description in the exception thrown when a constraint is not satisfied. The Field's ConstraintErrorDescription property corresponds to the ErrorDescription property of the first object in the collection. Since in many cases consists of a single constraint, this field property, together with Field's and makes it easier to specify a single constraint for a field, without using the collection editor. Gets the collection of field constraints, objects. Table Fields Gets the collection of field calculations, objects. Table Fields Gets or sets a value indicating whether DbNull values of a string field are returned as empty strings. Gets or sets a value indicating whether empty strings are stored as DbNull values. Gets or sets a description for the field. The base class for and . Gets the table to which the field belongs. Gets or sets a value indicating whether the values of this field in each row must be unique. If it is set to True, an attempt to assign a duplicate value to this field generates an exception. Table Fields Represents a simple table field. Initializes a new instance of the DbTableField class. Table the field belongs to. Initializes a new instance of the DbTableField class. Gets or sets the name of the database field this field is based on. This property value can be empty string, in which case the field is not based on a database field, represents a calculated field. Table Fields Gets or sets the value indicating whether the field value in the database can be changed. If this property is set to True, the field value will not be set in the database update operation (as with = Never) and it cannot be modified unless it is done in a newly added row, before the event (as with = True). Table Fields Gets or sets a value indicating whether the field value is sent to the database (to the server) for insert. If this property is set to True, the field value is not sent to the server for insert, even if the user has modified it. The default is False. Table Fields Updating the Database Gets or sets a value indicating whether the field value is sent to the database (to the server) for update. If this property is set to True, the field value is not sent to the server for update, even if the user has modified it. The default is False. Table Fields Updating the Database Gets or sets the value indicating whether the field value is used to locate the database record that is going to be updated. If this property is set to False, the field is not used for locating the database record, regardless of the value of . If it is set to True (default), this is determined by the value of the property. Table Fields Updating the Database Gets or sets a value indicating whether the field value is set in the database record. If this property is set to Always, the value in the database is always modified, set to the current field value. If it is set to Never, the value in the database is always left unchanged. If it is set to IfChanged (default), the value in the database is set to the current field value if the current field value is different from the original field value as it was last fetched from the database. The original value can be retrieved using .Item (field, .Original). Table Fields Updating the Database Gets or sets the value indicating whether the field value is refreshed, retrieved from the database after updating the database record. If this property is set to False, the field value is not refreshed, regardless of the value of . If it is set to True (default), this is determined by the value of the property. Table Fields Updating the Database Represents a composite table field. Initializes a new instance of the CompositeTableField class. Composite table the field belongs to. Initializes a new instance of the CompositeTableField class. Gets or sets the table view field on which this field is based. This property value can be null, in which case the field is not based on any of the constituent table fields, represents a calculated field belonging to the composite table. Composite Table Fields Represents a table view field. Initializes a new instance of the TableViewField class. Table view the field belongs to. Initializes a new instance of the TableViewField class. Gets the table view to which the field belongs. Gets or sets the table field on which this field is based. This property value can be null, in which case the field is not based on any of the table fields, represents a calculated field belonging to the table view. Table View Fields Specifies the cardinality of a relation. Simple Relations One-to-many relation. Many-to-one relation. Specifies the action applied to child rows when their parent key is modified or deleted. Simple Relations Delete or update child rows. No action taken on child rows. Set values in child rows to the value specified by the property. Set values in child rows to DbNull. Base class for simple and composite relations. Simple Relations Composite Relations Initializes a new instance of the Relation class. Schema the relation belongs to. Parent table of the relation. Child table of the relation. Initializes a new instance of the Relation class. Gets the schema the relation belongs to. Gets or sets the relation name. Gets or sets the parent table of the relation. Simple Relations Composite Relations Gets or sets the child table of the relation. Simple Relations Composite Relations Gets or sets one of the two values. Simple Relations Gets or sets a description for the relation. This value is displayed in the Schema Designer's Information window when you select the relation. Represents a relation between two simple tables. Simple Relations Initializes a new instance of the SimpleRelation class. Parent table of the relation. Child table of the relation. Initializes a new instance of the SimpleRelation class. Schema the relation belongs to. Initializes a new instance of the SimpleRelation class. Gets the joins collection of the relation. Simple Relations Gets or sets a value indicating whether the rule prohibiting child rows without parent is enforced. The default is True. Simple Relations Gets or sets a value specifying the action applied to child rows when their parent key is modified. The default is Cascade. Simple Relations Gets or sets a value specifying the action applied to child rows when their parent key is deleted. The default is None. Simple Relations Gets or sets a value indicating whether the database performs cascade update of child key values when their parent key value is modified. The default is True. Performing database update in a cascade key update situation, C1DataObjects must know whether the database is performing cascade update as well. Simple Relations Represents a relation between two tables one of which is composite. Composite Relations Initializes a new instance of the CompositeRelation class. Simple relation on which the composite relation is based. Parent table of the relation. Child table of the relation. Initializes a new instance of the CompositeRelation class. Schema the relation belongs to. Initializes a new instance of the CompositeRelation class. Gets or sets the on which this composite relation is based. Composite Relations Gets or sets the table view in the composite table that is used as the parent table for the . Composite Relations Gets or sets the table view in the composite table that is used as the child table for the . Composite Relations Represents an equality condition between a parent and a child field of a . Simple Relations Initializes a new instance of the JoinCondition class. The collection of join conditions of a relation this join condition belongs to. Gets or sets the parent field of the join condition. Simple Relations Gets or sets the child field of the join condition. Simple Relations Gets the collection to which the join object belongs. Represents a collection of objects of a . Adds a new element to the collection. The object to be added to the end of the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Inserts an element into the collection at the specified index. The zero-based index at which object should be inserted. The object to insert. Returns the zero-based index of the join object in the collection. The join object to locate in the collection. The zero-based index of an element, if found; otherwise, -1. Determines whether an element is in the collection. The Object to locate in the collection. True if join is found in the collection; otherwise, False. Removes the first occurrence of a specific object from the collection. The object to remove from the collection. Gets the this collection belongs to. Gets the element of the collection at the specified index. The zero-based index of the element. The main class of the C1.Data.SchemaObjects namespace, representing a schema. Saves the schema in a file or stream. Full name of the file where the schema is saved. Saves the schema in a file or stream. The stream where the schema is saved. Loads the schema from a file or stream. Full name of the file from which the schema is loaded. Loads the schema from a file or stream. The stream from which the schema is loaded. Returns unique string index name for collection. Can be used for classes inherited from CollectionBase. Collection String part which will ahead of number if defaultRelVal already exists in collection First checks this value. If does not exist, builds index name as indexBase + [numeric id] Gets the data set definition collection. Gets the table collection. Gets the relation collection. Gets the connection collection. Represents a collection of objects. Gets the index of an element with a given name in the collection. The of the element. The zero-based index of an element, if found; otherwise, -1. Gets the index of a given element in the collection. The element of the collection. The zero-based index of an element, if found; otherwise, -1. Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which obj should be inserted. The object to insert. Removes the first occurrence of a specific object. The Object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Determines whether an element is in the collection. The of the element. True if element is found in the collection; otherwise, False. Gets the element of the collection at the specified index. The index of the object. Gets the element of the collection at the specified index. The of the object. Represents a collection of objects. Gets the index of an object in the collection. The of the element. Returns the index of the object. Gets the index of an object in the collection. The element of the collection. Gets the index of an object. Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which obj should be inserted. The object to insert. Removes the first occurrence of a specific object. The Object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Determines whether an element is in the collection. The of the element. True if table with a given name is found in the collection; otherwise, False. Gets the element of the collection at the specified index. The index of the object. Gets the element of the collection at the specified index. The of the object. Represents a collection of objects. Gets the index of the relation object with a given name in the collection. The of the element. The zero-based index of an element, if found; otherwise, -1. Gets the index of the relation object in the collection. The element of the collection. The zero-based index of an element, if found; otherwise, -1. Adds a new element to the collection. The object to be added to the end of the collection. Inserts an element into the collection at the specified index. The zero-based index at which obj should be inserted. The object to insert. Removes the first occurrence of a specific object. The Object to remove from the collection. Copies the collection or a portion of it to a one-dimensional array. The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing. The zero-based index in array at which copying begins. Determines whether an element is in the collection. The of the element. True if relation with a given name is found in the collection; otherwise, False. Gets the element of the collection at the specified index. The index of the object. Gets the element of the collection at the specified index. The of the object. Summary description for SchemaDesignerBase. Specifies general SQL syntax used by a database. Current C1DataObjects version uses the following features of SQL2 standard, if Syntax = SQL2: Joins in FROM clause. Compliant with SQL2 standard. Such are, for example, Microsoft SQL Server and Microsoft Access. Oracle SQL syntax. SQL engines supporting only SQL1 standard. Specifies quotation rules for names in SQL statements. No quotation. Example: a name Square brackets: Example: [a name] Double quote. Example: "a name" Single quote. Example: 'a name' Indicates how autoincrement key value is retrieved for inserted row: before, after or in the same scope with the INSERT command. Used in the property of a connection. Key Assigned Automatically by Database Autoincrement key value is obtained (generated by a sequence/generator object) before executing the INSERT command. This option is used with Oracle, Interbase and other databases that support special database objects for generating autoincrement (identity) values. This option is used if there is no on INSERT trigger setting the autoincrement key value. If there is such trigger, the AfterInsertCommand option is used. Autoincrement key value retrieval is done by the same command that inserts the row. The generated command consists of two SQL commands separated by semicolon: first INSERT, then the identity retrieval command. This option is used with Sql Server and can be used with other databases. It is necessary to support the SCOPE_IDENTITY() function that is used for identity retrieval. Autoincrement value is retrieved by a separate command after the INSERT command has been executed. This option is used with Microsoft Access and can be used with other databases. This class contains represents various specifics of SQL syntax relevant to C1DataObjects that can vary between different databases. Database Connections Gets the object to which this object belongs. Gets or sets one of the values specifying the SQL dialect syntax. Gets or sets one of the values specifying the quotation rule for names. Name that are not well-formed identifiers (not start with a letter or containing characters other than letters and digits) need to be quoted in SQL statements. This property determines the quotation mark used in these cases. Database Connections Gets or sets a value indicating whether to add "AS" between table name and table alias. Database Connections Gets or sets a value indicating whether DEFAULT keyword is supported in the VALUES() list in INSERT statement. This property is used generating an INSERT statement, only if no field values are specified, so all fields in the new row must have default values determined by the database. If this property is True, "VALUES (DEFAULT)" is used in the statement. If it is False, "DEFAULT VALUES" is used. Gets or sets a string representing the SELECT command returning the last assigned identity (autoincrement) value in the current database connection. Implementing autoincrement functionality on adding a row for a field with = ClientAndServer, C1DataObjects tries to retrieve the autoincrement (identity) values assigned by the database to the field, in order to refresh that value on the client. If your database supports retrieving the last assigned identity value via a single command, you can set this property to a command string retrieving that value. That will be enough for C1DataObjects to implement the autoincrement refresh functionality. This property is used in conjunction with the property. By default, C1DataObjects sets correct values for well-known databases such as SQL Server, MS Access, Oracle, Interbase. For example, in SQL Server 2000, this command is "SELECT SCOPE_IDENTITY()" and is InInsertCommand. In Microsoft Access, this command is "SELECT @@IDENTITY" and the is AfterInsertCommand. In Oracle and Interbase, there are two options: If you need a trigger setting the autoincrement key value on INSERT, use = AfterInsertCommand and the following properties for Oracle and Interbase: Oracle: set IdentityColumnLastValueSelect = SELECT %AUTOINCREMENTSEQUENCENAME%.CURRVAL FROM DUAL and set the field property to the corresponding sequence name. Interbase: set IdentityColumnLastValueSelect = SELECT GEN_ID(%AUTOINCREMENTSEQUENCENAME%, 0) FROM RDB$DATABASE and set the field property to the corresponding generator name. Without such trigger, set the = BeforeInsertCommand and the following properties for Oracle and Interbase: Oracle: set = SELECT %AUTOINCREMENTSEQUENCENAME%.NEXTVAL FROM DUAL and set the field property to the corresponding sequence name. Interbase: set = SELECT GEN_ID(%AUTOINCREMENTSEQUENCENAME%, 1) FROM RDB$DATABASE and set the field property to the corresponding generator name. If your database does not support this functionality, you still can implement refreshing autoincrement value in AutoIncrement = ClientAndServer writing code in AfterUpdateRow event as shown in Keys Assigned by Server or Database. Keys Assigned by Server or Database Gets or sets a value indicating how autoincrement key value is retrieved for inserted row: before, after or in the same scope with the INSERT command. Keys Assigned by Server or Database Gets or sets a value indicating whether every table and column name must be quoted to avoid collision with reserved keywords. If this property is set to True, table and field names are always escaped in generated SQL statements. This is useful to ensure that the names do not conflict with database-reserved words. The quotation mark is determined by the property value (for example, [field] in MS Access, "field" in SQL Server and Oracle). Default: False. Database Connections Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Provides static methods that should be called from the constructors of licensed classes. Also provides a static method that can be called to show the about box with product and licensing information. Perform license validation. Call this method from the licensed object's constructor to save a license key at design time, validate it at runtime, and display a nag dialog if a valid license is not found. Type of licensed object (use typeof() and not GetType()). Reference to the licensed object (not currently used). A object that contains information about the license. Check the ShouldNag property of the returned to determine whether the licensed class should nag the user. This value is set to true in situations where a valid license was not found but a nag dialog could not be displayed. In these cases, the licensed class is supposed to nag in some other way (with a watermark for example). Perform license validation. Call this method from the licensed object's constructor to save a license key at design time, validate it at runtime, and display a nag dialog if a valid license is not found. Type of licensed object (use typeof() and not GetType()). Reference to the licensed object (not currently used). Whether the nag dialog should be displayed when a valid license is not found. A object that contains information about the license. This overload was created for use in WPF. It should be called in the control's constructor in order to support license persistence correctly. But it should not show the nag dialog until the control is fully loaded, or the VS designer may remain blank. So the solution is this: LicenseInfo _licInfo; public LicensedControl() { // check license but don't nag yet _licInfo = ProviderInfo.Validate(typeof(LicensedControl), this, false); // perform licensing after control is fully loaded Loaded += LicensedControl_Loaded; } void LicensedControl_Loaded(object sender, RoutedEventArgs e) { // nag after loading if (_licInfo.ShouldNag) { ProviderInfo.ShowAboutBox(this); } } Nag user by showing AboutBox with license information. Show it only once per day per assembly. Type of licensed object (use typeof() and not GetType()). object that contains information about the license. Whether we're running at design or run time. Version of Validate used by constructors that take runtime keys. Type of licensed object (use typeof() and not GetType()). Reference to the licensed object. Assembly that contains the owner licensed control. Any valid C1 runtime key. A with information about the runtime key. This allows a licensed C1 class to create other C1 objects bypassing license verification for the child objects. For extra safety, we check that the owner object is defined in an assembly the contains a 'C1ProductInfo' attribute. Design time validation. Looks for a license in the registry and saves it in the provided . Type of licensed object (use typeof() and not GetType()). where the runtime key will be stored. A with information about the license. Call this method from application-type products (that always require a license to be installed in the registry). In this case, the parameter should be set to null. Runtime validation. Looks for a runtime key stored in the current application's resources. Type of licensed object (use typeof() and not GetType()). where the runtime key will be stored. A with information about the license. Shows the About Box for an instance of a C1 product. Get the type whose assembly contains a 'C1ProductInfoAttribute'. Instance of an object whose type is to be checked. The type whose assembly contains a 'C1ProductInfoAttribute' Contains information about a license stored in an application. Initializes a new instance of a class. Initializes a new instance of a class. Gets or sets the status of this license (valid, expired, unlicensed). Gets or sets the associated with this license. Gets or sets the associated with this license. Gets the number of evaluation days elapsed. Returns -1 for valid licenses. Gets the number of evaluation days still left. Gets or sets a value that determines whether the caller should nag the user. This is the case when the component/control is not licensed, but is not running in interactive mode. So we can't show a dialog and the caller is supposed to nag some other way (typically by adding watermarks to the UI or output). Gets a value that determines whether the license found is valid. Gets a value that determines whether the license found is expired. Gets a value that determines whether the component is running under localhost and therefore should not nag the user with alert dialogs. Provides a version of GetSavedLicenseKey that doesn't require special permissions. The code was mostly copied from the .NET framework, but then changed in a few places to require fewer permissions (assembly name, file io, etc). The main change is the use of a custom deserializer to read Hashtable objects instead of the original BinaryFormatter, which requires permissions. Attribute used to specify the product name shown on the About Box. Attribute used to attach licensing/product information to assemblies. C1DescriptionAttribute replaces the DescriptionAttribute and uses the C1Localizer class to return the localized Attribute string C1CategoryAttribute replaces the CategoryAttribute and uses the C1Localizer class to return the localized Attribute string Localization tables and methods for looking up localized strings. Represents a license for a product (e.g. C1BarCode, C1Studio Enterprise). Provides methods for: - generating new license keys (administrative task) - checking license key validity (used by installer and products) - generating and checking runtime keys (used by products) - installing/uninstalling licenses (used by installer) The install/uninstall code requires elevated permissions, and is used only by setups and utilities (not by controls). The code is implemented in the ProductLicense.Installer.cs, which controls should not include since it won't be useful to them. When a product is sold, we send the user a license KEY. The user installs a license on his machine by providing his name, his company name, and the key. The is a string in the following format: AAQYYCC-XX-NNNNNN-DD-DZZZZZZ Where: AA: Product code (should match one of the products in the product catalog (see ProductInformation.GetProductCatalog()). Q: Quarter when the license key was issued (1, 2, or 3) YY: Year when the license key was issued (e.g., 10 for 2010) CC: Order code, two chars that indicate whether this is a new sale, upgrade, renewal, special offer, etc. XX: Hash code to ensure key validity. NNNNNN: Unique serial number. DDD: Vendor code, three chars ZZZZZZ: Combination of random numbers for uniqueness and extra hash. Interface used to provide feedback and the ability to cancel potentially long operations Determines how item types are serialized Item type is not serialized (this is the default) Item type is serialized as a fully qualified name Item type is serialized as a fully qualified name and assembly name Use owner's IMemberTypeEncoder for members (for collection items, this is done automatically). Helper class for implementors of IMemberTypeEncoder Forces the serializer to serialize the type name of a property or field This attribute allows to specify collection's element type name (in that case there is no need to store it). Serializes and deserializes objects into and from XML. All the methods in this class are static (Shared in Visual Basic). You cannot create an instance of this class. Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. DOES NOT close the underlying stream. Useful for copying objects. Caller is responsible to call out writer.Close() to close writer and underlying stream. The Stream used to write the XML-document instance The Object to serialize The XmlSerializerNamespaces referenced by the object The XmlWriter object reference. Call writer.Close after working with stream/writer. Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. The Stream used to write the XML-document instance The Object to serialize The XmlSerializerNamespaces referenced by the object Serializes the specified Object and writes the XML-document instance to a file using the specified XmlWriter The XmlWriter used to write the XML-document instance The Object to serialize The XmlSerializerNamespaces referenced by the object Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. DOES NOT close the underlying stream. Useful for copying objects. Caller is responsible to call out writer.Close() to close writer and underlying stream. The Stream used to write the XML-document instance The Object to serialize The FieldInfo or MemberInfo object context for the object to serialize The XmlSerializerNamespaces referenced by the object The XmlWriter object reference. Call writer.Close after working with stream/writer. Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. The Stream used to write the XML-document instance The Object to serialize The FieldInfo or MemberInfo object context for the object to serialize The XmlSerializerNamespaces referenced by the object Serializes the specified Object and writes the XML-document instance to a file using the specified XmlWriter The XmlWriter used to write the XML-document instance The Object to serialize The FieldInfo or MemberInfo object context for the object to serialize The XmlSerializerNamespaces referenced by the object Serializes the specified object to an XML formatted string. Used to write the namespaces as attributes for the initial object Given a list of Field or Property attributes returns visibility Enumerates and serializes all public fields and properties The XmlWriter used to write the XML-document instance The Object to serialize Deserializes an XML-document instance The Stream containing the XML-document instance to deserialize The type of object being deserialized The Object being deserialized Deserializes an XML-document instance The Stream containing the XML-document instance to deserialize The type of object being deserialized The type of array elements (in case the object is an array) The Object being deserialized Deserializes an XML-document instance The XmlReader containing the XML-document instance to deserialize The type of object being deserialized The Object being deserialized Deserializes object The XmlReader containing the XML-document instance to deserialize The Object being deserialized The type of object being deserialized The type of array elements (in case the object is an array) The Object being deserialized Deserializes an XML document string Deserializes an XML document string Deserializes text of element or attribute into object of appropriate type The XmlReader containing the XML-document instance to deserialize The type of object being deserialized The Object being deserialized Recognizes type of object serialized in element The XmlReader containing the XML-document instance to deserialize The default type of object being deserialized The type of object being deserialized Deserializes array or collection The XmlReader containing the XML-document instance to deserialize Collection item type The array or collection being deserialized Returns the "almost" fully qualified type name - i.e. with assembly name, but without version, culture, and public key. Type Type name, assembly name Sets or returns the object implementing IOnLongOpInProgressProvider interface (can be used to provide visual feedback to the user during serialization). Sets or returns formatting used by the XML writer. Sets or returns indentation used by the XML writer. Sets or returns serialization of non-public properties. If true non-public properties are included, but are hidden by default. Public properties are always visible by default.