DbDataTable is an Intent Design for reading from a data source, making in-memory changes to data, with an eventual bulk update of the data source from the memory data. DbDataTable design implements the disconnected mode of ADO.Net. dbDataTable is able to: Initially Fill() the memory table with the results of a SELECT statement Access the metadata through the ColumnNames Rule Determine the row count through the RowCount Rule Access the data through the GetFieldValue() or GetRowFieldValues() Methods Add new rows into the memory table through the AddRow() Method Delete rows from the memory table through the DeleteRow() Method Change data values in the rows through the SetFieldValue() or SetRowFieldValues() Methods Bulk update of the data source through the Update() Method
ADO.Net Designs assume that the dbDataTable parts should be children of dbConnection.
Fill( ) As Any
GetFieldValue( Row as Integer, Column as Any ) As Any
GetRowFieldValues( Row As Integer ) As List
AddRow( fieldValues As List, _
Optional update? As Boolean = False ) As Any SetFieldValue( Row As Integer, _
Column as Any, _
Value As Any, _
Optional update? As Boolean = False ) As Any SetRowFieldValues( Row As Integer, _
Values As List, _
Optional update? As Boolean = False ) As Any DeleteRow( Row As Integer, _
Optional update? As Boolean = False ) As Any Update( Optional refresh? As Boolean = True ) As Any
In this case, the result is returned in a result set.
| Child Name: | spRun | |
| Child Design: | DbQueryCommand | |
| Name | Type | Supplied |
| connection | part | Root.sqlServerConnection |
| tableName | string | MemoryTable |
| SelectCommandText | string | SELECT * From CarsTable |
Intent >AddRow({100,"Tatra","White","Czech"}) ?Add new car
--> True
Intent >DeleteRow(1) ?Delete ?Lada? car
--> True
Intent >SetFieldValue(4,"Comments","Italian") ?Change Italia->Italian
--> True
Intent >Update() ?Bulk update
--> True