This class is used to hold information about the columns bound to an instance of a wxDbTable object.
Each instance of this class describes one column in the wxDbTable object. When calling the wxDb constructor, a parameter passed in indicates the number of columns that will be defined for the wxDbTable object. The constructor uses this information to allocate adequate memory for all of the column descriptions in your wxDbTable object. Private member wxDbTable::colDefs is a pointer to this chunk of memory maintained by the wxDbTable class (and can be retrieved using the wxDbTable::GetColDefs function). To access the nth column definition of your wxDbTable object, just reference wxDbColDefs element [n - 1].
Typically, wxDbTable::SetColDefs is used to populate an array of these data structures for the wxDbTable instance.
Currently there are no accessor functions for this class, so all members are public.
wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name int DbDataType; - Logical Data Type; e.g. DB_DATA_TYPE_INTEGER SWORD SqlCtype; - C data type; e.g. SQL_C_LONG void *PtrDataObj; - Address of the data object int SzDataObj; - Size, in bytes, of the data object bool KeyField; - Is column part of the PRIMARY KEY for the table? -- Date fields should NOT be KeyFields bool Updateable; - Column is updateable? bool InsertAllowed; - Column included in INSERT statements? bool DerivedCol; - Column is a derived value? SDWORD CbValue; - !!!Internal use only!!! bool Null; - NOT FULLY IMPLEMENTED Allows NULL values in Inserts and UpdatesSee also
database classes overview, wxDbTable::GetColDefs, wxDb constructor
Include files
<wx/db.h>
Members
Simply initializes all member variables to a cleared state. Called by the constructor automatically.