Support has been added for Paradox databases. The installation now ships with a paradox sample database and a paradox ClassGen database. This eliminates the previous need for InterBase to be installed and for the Interbase database server to be running.
Support has also been added for DbIsam. This will require that the DbIsam components be installed within the Delphi IDE - provided by Elevate Software at http://www.elevatesoft.com/.
TosDbRecord - base class for all business record classes
ModFields : TosModFieldList property - used to maintain an active list of modified fields within the record. This replaces the need to carry a PrevValue and LoadValue variant on each field object and is the primary reason for the 20% reduction in memory. In the majority of circumstances, records do not have any modified fields and thus the 16 bytes of overhead for each field in the record is eliminated.
RollbackFields : TosRollbackFieldList property - used in conjunction with new methods called StartChanges, CancelChanges and ClearChanges to provide a in-memory rollback mechanism. Opening a dialog to edit a record typically provides an Ok and Cancel button to the end-user - clicking Cancel meant that all modifications performed by the user should not be performed. Use StartChanges when opening the dialog, and then CancelChanges if the Cancel button is clicked and all operations performed by the user will be undone. In contrast, the existing feature Undo only put back the previous value.
BindContentFields method - used in web applications to automatically bind the Content of a web form (Content) to the fields of the record based on mapped field names. Naming the web form fields to match the fieldnames (without the preceding alias and period) of the record will dramatically reduce coding requirements.
ReplaceTag method - used in web applications to handle tag substitution. Typically tags will be named with the fieldname they are bound to without the alias in front (ie. Firstname instead of pers.FirstName). FieldByName raises an exception if the field is not located in the fieldlist, and expects database fields (vs computed) to be prefixed with the alias.
UpdateMode : TosUpdateMode - used to indicate the update and delete syntax fro SQL operations. The valid options are up upWhereKeyOnly, upWhereAll, upWhereChanged, or upWhereKeyPhantom. Previously operations were always and only performed using the primary key (this is the default in V2).
Active Property Removed from published - Active property is no longer a published property in order to eliminate any confusion with a typical Tquery component. This property was intended to be read only and to only indicate when the record has been loaded with valid data from the database, and not to be used to fetch from the database such as a Tquery would do.
PkFetch method - new method to provide a simple single line method to take the supplied value and perform a Fetch operation. This only works on single field primary key tables. It will clear the filters, apply a filter on the primary key field of the class and perform a fetch operation.
TosDataSet - base class for all business datasets
30% CPU improvement on loading datasets (especially larger ones exceeding 100 records).
SQL SELECT statements on single table classes no longer specify the entire field list, instead a SELECT * is performed. Multi-table classes still generate a complete field listing due to the potential for duplicate column names being present in the two tables. Column that exist in the database but do not exist in the class will be ignored.
Init method - new method with three (3) arguments (fieldname, operator, value) to condense the number of lines required to perform a simple load operation. This method will clear the filters, add a new filter based on the arguments supplied and perform a SQL select operation to load matching records.
Locate method - similar to the TdataSet.locate method which allows an array of fields and values to be specified in the search criteria. In addition, the last argument called Options provides two options to control the text search to be case-sensitive (default is insensitive) and whether or not the found record should be selected (ie. Current position within the dataset is changed or not).
DefaultQuery : String - new property to specify a default query that is applied to all SQL SELECT operations.
BindContentQueryFields method - creates a single filter per query field on the dataset. Matches the supplied queryfields by name to the fields within the dataset, and configures one or more filters to perform a subsequent Load or Append operation.
HTMLSelection method - generates the options for an HTML SELECT (listbox or combobox) based on the dataset and supplied fields. An example arrangement is shown below where the SELECT called cbProduct is a combobox where the ProductOptions html tag will be replaced with the appropriate options listing as provided by the HTMLSelection method.
NumberOfPages method - returns the number of pages within the dataset based on the number of valid records and the FetchLimit property.Returns 1 page if the FetchLimit is set to the default value of 0.
NextSetOfRecords method - adjusts the FetchStart property and appends the next set of records based on the FetchLimit property.
PrevSetOfRecords method - adjusts the FetchStart property and appends the previous set of records based on the FetchLimit property.
HideWhere method - uses the supplied query condition to hide those records which match the criteria.
SelectWhere method - uses the supplied query condition to mark those records which match the criteria as selected.
ToggleSortOnField method - toggles the sort order on the specified field from ascending to descending or vice-versa or puts on an ascending order if no sorting is applied to the field.
SortField[iIndex : Integer] property - returns the TosSortField object for the index specified (zero based).
SQL Select on Computed Fields - including computed fields within a SQL Select statement was not possible in prior versions of ObjectSight. It is now in order to support more complex queries that may operate on multiple fields or use SQL Select functions. The TosFieldDef property called QueryFieldName can be specified at runtime to control the resulting SQL (ie. ComputedField1.QueryField := 'tabl.Date2-tabl.Date1).
Active Property Removed from published - Active property is no longer a published property in order to eliminate any confusion with a typical Tquery component. This property was intended to be read only and to only indicate when the dataset has been loaded with valid data from the database, and not to be used to load from the database such as a Tquery would do.
TosViewDataSet class (NEW)
This new non-visual control provides a mechanism to create business views using dynamic SQL. This is not a real business class as there is no coded business behaviour within any set or get operations, and no built in custom methods. It's purpose is to provide a component to create complex multi-table queries and result-sets and either use the results within a cache or within a report.
New Class Generator Features
Only minor changes and defects have been addressed in version 2
New Controls and Enhancements
New Reporting Controls
Two new reporting controls have been added to the ObjectSight framework. TosQrGrid is an easy to use grid control for the QuickReport environment to present columnar grids similar to the TosDbTopGrid component. TosQrLabel is an object bound QuickReport label control that has a datasource and datafield property to bind the control to a specific business class and field.
The TosQrGrid is especially powerful for reporting as it allows multiple side by side controls to display column results. Something that is very difficult (and sometimes not even possible) in QuickReports and other reporting tools. Layouts are also controlled by the Grid Manager providing both design-time and run-time customization.
Visual Controls
Only minor changes and defects have been addressed in version 2.
Web Controls
The TosHTMLGridProducer component has been substantially enhanced with a new paging control mechanism. Web applications can now easily present large datasets with paging control. Page information (ie. 250 records (1 of 10 pages)) with buttons for First, Previous, Next and Last is automatically presented at the bottom of the HTML table. Backend WebServer applications can be CGI, ISAPI or WebSnap.
Binding data to and from Web forms has never been easier -- HTML Web forms are easily presented using the new TosDbRecord.ReplaceTag method, and data from the Web form is easily bound back to the business object using the new BindContentFields method.
New Grid Features and Enhancements
Grid Control TosDbTopGrid
Substantial performance improvements have been realized in the latest release of this control. In most circumstances though, this improvement will not be noticed as the primary improvement is related to CPU benefits surrounding painting.
The grid now supports sorting on multiple columns. In users can simply click the column heading to reset the sort, and/or hold the control key down with a click to append additional columns for sorting. If grouping is applied, sort operations are performed within each group. In addition, a new pop-up menu option is provided to access a grouping and sorting dialog for the grid.
End-user adjustments to the sorting grouping of the grid have always been remembered between sessions. This functionality has now been improved to also include memory of the multis sorting feature, and to remember the settings even when a single grid component is used with multiple layouts. In addition, a new property has been added to the grid editor to disable this memory feature.
Combos continue to be loaded using database table definitions as defined within the column editor. An alternative loading mechanism has now been provided to specify cached data sets within the application.
FieldSize in associated text field (TosFieldDef) of a column is now used to limit the number of characters that can be entered into the cell when editing.
FieldSelector popup dialog now only lists those fields which are valid within the associated dataset class. This ensures that users cannot inadvertenly select a column which may no longer exist within the dataset.
No changes have been made to the built-in grid printing features.
Grid Manager
The Grid manager continues to be the primary tool for administrative management of grid layouts, system and user preferences, and next ID values.
The Grid manager will automatically perform the necessary table alterations to the ObjectSight tables (osGrids, osGridColumns, osGridSettings) that are needed to properly support V2.0 In addition, the new osWebSession table will be created. This upgrade operation is detected when the database is initially connected to, and a upgrade dialog is presented to describe the operation to the end-user.
Various grid editor features are only enabled when accessed from the Grid manager, such as applying the system default layout, adjusting base layouts, and propagating base column definitions to other layouts.
Grid Editor
The ObjectSight grid editor that is used within runtime applications has received several improvments, and several more will be appearing over the next several minor releases.
The grid component editor within the Delphi IDE has been improved by adding a grid wizard to easily and quickly create both the column definitions and default layout based on a business class definition.
Two new flags are available on the Layout tab - Layout Memory and Enable Grid Popup Menu. Layout Memory indicates whether or not any user sorting or grouping operations are remembered between sessions of that grid layout. Enable Grid Popup Menu indicates whether or not the built in grid popup menu options are presented at runtime to end-users.
The option now exists to create a default grid layout to specify preferred settings in terms of color, fonts and behaviors for an application. The properties of this default layout can then be applied to other application layouts.
Grid layouts can be exported and imported in XML format.
The grid editor has a new option to propagate column properties from the base layout to the default layout and all end-user layouts. In addition, removing a column from the base layout will prompt to remove that column from all other layouts and resequence them.
Other
RecordDump improved to allow editing and saving operations.
ObjectSight 1.1 Past Release
Release Date: July 2, 2002
Methods and Properties 1.1
TosDataSet.SelectWhere to select records matching search criteria
TosDataSet.HideWhere to hide records matching search criteria
TosDataSet.ValidRecordCount to return the number of valid records in the dataset excluding hidden records, group hidden records (collapsed) and group records.
TosDataSet.IsFirstRow boolean function that indicates if the Current record is the first record
TosDataSet.IsLastRow boolean function that indicates if the Current record is the last record
TosDataSet.BindContentQueryFields binds a TStrings list of fields name/value pairs to the fields of the SearchRec to establish search criteria on the dataset. Initial routine for new Web Generation product being released by ObjectSight later in 2002.
TosDbRecord.ClearChanged function to clear the changed flag on all fields
New function TosDataSet.DbRecordCountWhere(sSQL : String) : Integer to perform a record count using the sSQL parameter as the where clause (tables and joins are based on dataset class).
TosDataSet.NextSetOfRecords to Append next set of records based on FetchLimit and FetchStart properties
TosDataSet.AutoLoad default is now False
TosDbRecord.Children property made public to allow read only access to the known child objects
TosDataSet.AssignToList and AppendToList methods now automatically load dataset if AutoLoad = True
TosDbRecord.ModifiedFieldsCount to provide count of modified fields in record
TosField.Changed property which is similar to modified but is only for Application use to perform controlled (partial) Undo operations
TosDbRecord.Undo method includes an optional argument to only undo changed fields
TosDbRecord.XMLRecord property produces XML record definition with all fields (data and computed)
New column called tablename (nullable) on the osSequences table to support the TosSequence.ResetNextId method (SELECT MAX)
ObjectSight now supports reading/writing blob data to the database with new properties on TosField such as AsBlob, LoadFromStream, SaveAsStream and BlobSize.
Class Generator Features 1.1
Class TreeView by Prefix provided for easy navigation
New dialog to define non-bde database connections to ASTA servers, Interbase and DbIsam which can then be used to open alternative ClassGen databases.
Classes now have a blob description to allow documentation of classes
Attributes now have two new properties AssociatedSubClass and AssociatedAttribute provides details for generation of subclass properies (ie. Customer.StatusName from subclass TdmoCustomerStatus).
New Under Review checkbox on Classes and Methods to make it easy to determine which classes and methods still need to be reviewed prior to generation.
Cache lookups now generate shorter syntax using CachedObject call instead of CachedList call.
Computed fields (Attributes) can be converted to data fields (table columns) by clicking the Table button on Attributes Database tab.
Grid Features 1.1
Export Import dialog within GridManager now exports and imports grid and column layouts to XML files instead of CSV
Grid editor changes include new property for UpdateObject to indicate when object field value is to be updated (OnChange or OnExit), new property for InactiveButtonState to specify when combo, button and Spin images should appear in cell
Performance of Inserting and Removing columns from the grid layout at runtime has been dramatically improved (fewer SQL statements to resequence layout)
Default for grouping is now to contract groups and hide detail rows - default can be changed using osOptions.ini file with
New menu option on Grid submenu (at runtime) to Reset the layout back to the default layout (is only enabled if not currently showing the default layout).
GridManager allows creation of a base grid called SystemDefault which can then be used from within the GridEditor to APPLY the properties of the SystemDefault layout to new and existing Application and User layouts
Column lookup now supports a filter that can be specified either at design time within the Grid Column Editor or at runtime. The filter is used to provide a subset of records within the Combo dropdown.
New property on grid called PrintOptions to provide customization of grid printing.
Grid printing dialog now available by calling grid.PrintDlg method (dialog allows for customization of grid layout)
Grid reporting improved to provide 3 options for row highlights (bands, lines and none)
Grid reporting improved to better distinguish the group heading rows with a green line, and group footer totals display with a box
PrintDlg provides options to change printer, PaperSize, Portrait/Landscape, Row Display, Report Title and Preview or Printing.
New events on TosDbTopGrid called OnDrawGroupHeader, OnDrawGroupFooter, OnGrouping, OnSorting, and OnUpdateSelected
OnDrawGroupHeader and OnDrawGroupFooter both provide the Group DataRecord and Text as arguments. The Text is a var argument to allow customization of the grouping text.
OnGrouping and OnSorting are new events that go off when the grid contents are sorted or grouped by the grid methods (ie. GroupOnField)
OnUpdateSelected is a new event associated with a new powerful method called UpdateSelected which performs a SINGLE SQL UPDATE operation on the selected records of the grid. UpdateSelected takes four arguments to perform a single UPDATE operation on the selected records followed by changing the field of the associated grid dataset. Prior to this a DataSet.Save operation would have performed a single UPDATE operation per modified record.
Grid datetime cells now support easy date entry at runtime (Spacebar or 'now') convert to today's datetime, tod[ay] converts to todays date, tom[orrow] converts to tomorrows date, yes[terday] convertes to yesterday's date.
Numerous Defects Repaired
See online results to view all fixed defects by release from download area (only available to existing clients).