QueryDef - a complete implementation of a dynamic recordset

Sourcefiles added (RecordsetPatch.dll)

provided by: 
Originally published at Internet.com


Overview

This article tries to explain the class library QueryDef intended to be used instead of the classic MFC class CRecordset. CRecordset is a great class with one single exception. You have to generate/write too much code. In a project I was involved there were over 700 recordsets defined. Soon working with CRecordset became a real hassle. I wanted a simpler method to access the data from an ODBC data source.

So the design goals of this library were: 1. Eliminate the need for one recordset-one class tuple. 2. Eliminate the need for bindings and the infamous list of data members henceforth. 3. Eliminate the need to know in advance the database schema. 4. Blur the distinction between a recordset and a stored procedure with output parameters. 5. Ease the access to the recordset column information. 6. Provide automatic conversion of data wherever is needed with easy formatting. 7. Simplifying the test with the SQL null value. 8. Provide a simple notification mechanism to bind visual controls with certain events related to the recordset. 9. Compatibilty with the CRecordset class (aka support for positioned updates and inserts).

The cornerstone of the library is the class CQueryDef. This class is designed to be used directly (w/o derivation) although there is nothing stopping you using it as a base class. Basically this class represents a collection of rows and columns returned from a SQL request. The table can be as small as no rows/no columns or as large as milions of rows with 255 columns. CQueryDef uses an internal representation of the column data making it possible to hold the following data types: * String or text (this includes numeric and decimal SQL types) * Int, long or short * Float and double * Datetime, smalldatetime, timestamps * Binary data ...

Read article at Internet.com site
Regional Articles
- QueryDef - a complete implementation of a dynamic recordset Alabama
- QueryDef - a complete implementation of a dynamic recordset Alaska
- QueryDef - a complete implementation of a dynamic recordset Arizona
- QueryDef - a complete implementation of a dynamic recordset Arkansas
- QueryDef - a complete implementation of a dynamic recordset California
- QueryDef - a complete implementation of a dynamic recordset Colorado
- QueryDef - a complete implementation of a dynamic recordset Connecticut
- QueryDef - a complete implementation of a dynamic recordset DC
- QueryDef - a complete implementation of a dynamic recordset Delaware
- QueryDef - a complete implementation of a dynamic recordset Florida
- QueryDef - a complete implementation of a dynamic recordset Georgia
- QueryDef - a complete implementation of a dynamic recordset Hawaii
- QueryDef - a complete implementation of a dynamic recordset Idaho
- QueryDef - a complete implementation of a dynamic recordset Illinois
- QueryDef - a complete implementation of a dynamic recordset Indiana
- QueryDef - a complete implementation of a dynamic recordset Iowa
- QueryDef - a complete implementation of a dynamic recordset Kansas
- QueryDef - a complete implementation of a dynamic recordset Kentucky
- QueryDef - a complete implementation of a dynamic recordset Louisiana
- QueryDef - a complete implementation of a dynamic recordset Maine
- QueryDef - a complete implementation of a dynamic recordset Maryland
- QueryDef - a complete implementation of a dynamic recordset Massachusetts
- QueryDef - a complete implementation of a dynamic recordset Michigan
- QueryDef - a complete implementation of a dynamic recordset Minnesota
- QueryDef - a complete implementation of a dynamic recordset Mississippi
- QueryDef - a complete implementation of a dynamic recordset Missouri
- QueryDef - a complete implementation of a dynamic recordset Montana
- QueryDef - a complete implementation of a dynamic recordset Nebraska
- QueryDef - a complete implementation of a dynamic recordset Nevada
- QueryDef - a complete implementation of a dynamic recordset New Hampshire
- QueryDef - a complete implementation of a dynamic recordset New Jersey
- QueryDef - a complete implementation of a dynamic recordset New Mexico
- QueryDef - a complete implementation of a dynamic recordset New York
- QueryDef - a complete implementation of a dynamic recordset North Carolina
- QueryDef - a complete implementation of a dynamic recordset North Dakota
- QueryDef - a complete implementation of a dynamic recordset Ohio
- QueryDef - a complete implementation of a dynamic recordset Oklahoma
- QueryDef - a complete implementation of a dynamic recordset Oregon
- QueryDef - a complete implementation of a dynamic recordset Pennsylvania
- QueryDef - a complete implementation of a dynamic recordset Rhode Island
- QueryDef - a complete implementation of a dynamic recordset South Carolina
- QueryDef - a complete implementation of a dynamic recordset South Dakota
- QueryDef - a complete implementation of a dynamic recordset Tennessee
- QueryDef - a complete implementation of a dynamic recordset Texas
- QueryDef - a complete implementation of a dynamic recordset Utah
- QueryDef - a complete implementation of a dynamic recordset Vermont
- QueryDef - a complete implementation of a dynamic recordset Virginia
- QueryDef - a complete implementation of a dynamic recordset Washington
- QueryDef - a complete implementation of a dynamic recordset West Virginia
- QueryDef - a complete implementation of a dynamic recordset Wisconsin
- QueryDef - a complete implementation of a dynamic recordset Wyoming

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML