Objective Grid : PART I User’s Guide : Chapter 8 DbQuery Tutorial
Chapter 8 DbQuery Tutorial
Introduction
In this section you will learn how to create ODBC applications with Objective Grid. The name of the application is DbQuery, and it displays the results of a CRecordset in a grid.
DbQuery shows you how to:
Generate a skeleton application.
Add menu handlers for CRecordset.
Add a record status beam to the scrollbar.
Source code files, project and solution files, and other necessary files for Steps 1 and 2 of the tutorial are obtainable from the Rogue Wave Web site, as described in “Location of Sample Code” in the Getting Started part. The code for Step 3 is located at <stingray-installdir>\Samples\Grid\Tutorial\DbQuery\Step3.
The tutorial steps do the following:
Step 1 generates a skeleton application with a CGXRecordView-derived view class.
Step 2 adds Delete and Requery menu handlers for the CRecordset.
Step 3 embeds CGXRecordView in a CGXRecordInfoWnd to give it a look similar to Microsoft Access.
If you're simply reading along with the tutorial without adding code, you can still compile DbQuery at each step to see what it looks like and how it behaves. Figure 74 shows what the final application will look like.
Figure 74 – Final DbQuery application in action