Contents Up Previous Next

wxQueryField

Represents the data item for one or several columns.

Derivation

wxObject

See also

wxQueryField overview, wxDatabase overview

Members

wxQueryField::wxQueryField
wxQueryField::~wxQueryField
wxQueryField::AllocData
wxQueryField::ClearData
wxQueryField::GetData
wxQueryField::GetSize
wxQueryField::GetType
wxQueryField::IsDirty
wxQueryField::SetData
wxQueryField::SetDirty
wxQueryField::SetSize
wxQueryField::SetType


wxQueryField::wxQueryField

wxQueryField()

Constructor. Sets type and size of the field to default values.


wxQueryField::~wxQueryField

~wxQueryField()

Destructor. Frees the associated memory depending on the field type.


wxQueryField::AllocData

bool AllocData()

Allocates memory depending on the size and type of the field.


wxQueryField::ClearData

void ClearData()

Deletes the contents of the field buffer without deallocating the memory.


wxQueryField::GetData

void * GetData()

Returns a pointer to the field buffer.


wxQueryField::GetSize

long GetSize()

Returns the size of the field buffer.


wxQueryField::GetType

short GetType()

Returns the type of the field (currently SQL_CHAR, SQL_VARCHAR or SQL_INTEGER).


wxQueryField::IsDirty

bool IsDirty()

Returns TRUE if the data of a field has been changed, but not saved.


wxQueryField::SetData

bool SetData(void *data, long sz)

Allocates memory of the size sz and copies the contents of d into the field buffer.


wxQueryField::SetDirty

void SetDirty(bool dirty = TRUE)

Sets the dirty tag of a field.


wxQueryField::SetSize

void SetSize(long size)

Resizes the field buffer. Stored data will be lost.


wxQueryField::SetType

void SetType(short type)

Sets the type of the field. Currently the types SQL_CHAR, SQL_VARCHAR and SQL_INTEGER are supported.