$szTitle = "wxdbcoldef"; include "./_header.inc"; ?>
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.
include "./_footer.inc"; ?>