Objective Grid : PART I User’s Guide : Chapter 3 Technical Overview : Browser Classes
Browser Classes
The Objective Grid Browser classes allow you to easily browse any external data source by overriding a few virtual methods. Objective Grid already provides special implementations of the browser classes for displaying ODBC CRecordset and ADO results.
The MFC ODBC classes do not directly support the ability to determine database schema information at run time. Objective Grid provides a full set of ODBC classes that allow the end user to specify and view the results of an SQL query at run-time (where schema is unknown). Objective Grid also supports the MFC paradigm where the developer uses ClassWizard to create record sets with a known schema.
Figure 37 shows the browser class hierarchy.
Figure 37 – Objective Grid database browser class hierarchy
CGXBrowserGrid
The CGXBrowserGrid encapsulates all the functionality necessary for browsing external data sources. By deriving your own class from CGXBrowserGrid, you can create Microsoft Query-like browsers for proprietary or unsupported database tool kits.
CGXBrowserView
The CGXBrowserView class represents the CGXBrowserGrid class as view.
CGXBrowserWnd
The CGXBrowserWnd class represents the grid component as child control. CGXBrowserWnd can be easily used as dialog control or in a workbook window.
CGXBrowseParam
CGXBrowseParam holds specific data for the CGXBrowserGrid. It can be shared among several views. You can embed it in a document if you want to support several browse views of the same data as in a dynamic splitter window.
CGXDbParam
CGXDbParam holds specific data for the CGXODBCGrid. It can be shared among several views. You can embed it in a document if you want to support several browse views on the same data as in a dynamic splitter window.
CGXDynamicRecordset
This class provides the functionality to specify SQL query statements at run time for ODBC recordsets. Instead of creating a CRecordset derived class with ClassWizard, you can create a CGXDynamicRecordset object and specify the SQL query statements by passing a string to the object.
CGXODBCGrid
The CGXODBCGrid class provides functionality for browsing ODBC data sources. This class lets you create Microsoft Query-like views. It uses the field exchange mechanism to exchange data between the grid and the recordset and supports adding, editing, and deleting records. CGXODBCGrid also supports find and replace, and freezing and dragging columns.
CGXRecordInfoBeam
This class provides the record status beam functionality used by CGXRecordInfoWnd. CGXRecordInfoBeam displays the current record in an edit field along with some navigation buttons. The end user can either click on the navigation buttons to scroll through the recordset or directly enter a record number in the edit field.
CGXRecordInfoWnd
This class displays a record status beam (similar to Microsoft Access or Microsoft Query) in the scrollbar.
CGXRecordInfoSplitterWnd
The CGXRecordInfoSplitterWnd embeds a non-resizable CGXRecordInfoBeam on the left side of the horizontal scrollbar of a CGXSplitterWnd. The user can use this CGXRecordInfoBeam to navigate through a grid just like you know from applications like Microsoft Access or Microsoft Query.
CGXRecordView
The CGXRecordView represents the grid-component as a view for browsing and changing recordsets.
CGXRecordWnd
The CGXRecordWnd represents the grid component as a CWnd or dialog-control for browsing and changing recordsets.
CGXRecSetInfo
CGXRecSetInfo is used by CGXBrowseParam to store information about the data source, the query string and the filename.
CGXAdoGrid
The CGXAdoGrid class provides functionality for browsing databases that can be accessed through any Microsoft OLE DB provider. This uses ADODB, an implementation of ADO optimized for use with Microsoft OLE DB providers. As for any CGXBrowserGrid derived class, this class lets you create Microsoft Query-like views where you can browse these databases.
CGXAdoParam
CGXAdoParam holds specific data for the CGXAdoGrid.
CGXAdoRecordView
The CGXAdoRecordView represents the CGXAdoGrid as a view for browsing and changing recordsets.
CGXAdoRecordWnd
The CGXAdoRecordWnd class represents the ADO grid browser as child control. CGXAdoRecordWnd can be easily used as a dialog control or in a workbook window.