Contents Up Previous Next

wxQueryCol

Every ODBC data column is represented by an instance of this class.

Derived from

wxObject

Include files

<wx/odbc.h>

See also

wxQueryCol overview, wxDatabase overview

Members

wxQueryCol::wxQueryCol
wxQueryCol::~wxQueryCol
wxQueryCol::BindVar
wxQueryCol::FillVar
wxQueryCol::GetData
wxQueryCol::GetName
wxQueryCol::GetType
wxQueryCol::GetSize
wxQueryCol::IsRowDirty
wxQueryCol::IsNullable
wxQueryCol::AppendField
wxQueryCol::SetData
wxQueryCol::SetName
wxQueryCol::SetNullable
wxQueryCol::SetFieldDirty
wxQueryCol::SetType


wxQueryCol::wxQueryCol

void wxQueryCol()

Constructor. Sets the attributes of the column to default values.


wxQueryCol::~wxQueryCol

void ~wxQueryCol()

Destructor. Deletes the wxQueryField list.


wxQueryCol::BindVar

void * BindVar(void *v, long sz)

Binds a user-defined variable to a column. Whenever a column is bound to a variable, it will automatically copy the data of the current field into this buffer (to a maximum of sz bytes).


wxQueryCol::FillVar

void FillVar(int recnum)

Fills the bound variable with the data of the field recnum. When no variable is bound to the column nothing will happen.


wxQueryCol::GetData

void * GetData(int field)

Returns a pointer to the data of the field.


wxQueryCol::GetName

wxString GetName()

Returns the name of a column.


wxQueryCol::GetType

short GetType()

Returns the data type of a column.


wxQueryCol::GetSize

long GetSize(int field)

Return the size of the data of the field field.


wxQueryCol::IsRowDirty

bool IsRowDirty(int field)

Returns TRUE if the given field has been changed, but not saved.


wxQueryCol::IsNullable

bool IsNullable()

Returns TRUE if a column may contain no data.


wxQueryCol::AppendField

void AppendField(void *buf, long len)

Appends a wxQueryField instance to the field list of the column. len bytes from buf will be copied into the field's buffer.


wxQueryCol::SetData

bool SetData(int field, void *buf, long len)

Sets the data of a field. This function finds the wxQueryField corresponding to field and calls wxQueryField::SetData with buf and len arguments.


wxQueryCol::SetName

void SetName(const wxString& name)

Sets the name of a column. Only useful when creating new tables or appending columns.


wxQueryCol::SetNullable

void SetNullable(bool nullable)

Determines whether a column may contain no data. Only useful when creating new tables or appending columns.


wxQueryCol::SetFieldDirty

void SetFieldDirty(int field, bool dirty = TRUE)

Sets the dirty tag of a given field.


wxQueryCol::SetType

void SetType(short type) Sets the data type of a column. Only useful when creating new tables or appending columns.