1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
\section{\class{wxQueryCol}}\label{wxquerycol}
Every ODBC data column is represented by an instance of this class.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/odbc.h>
\wxheading{See also}
\overview{wxQueryCol overview}{wxquerycoloverview}, \overview{wxDatabase overview}{wxdatabaseoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxQueryCol::wxQueryCol}
\func{void}{wxQueryCol}{\void}
Constructor. Sets the attributes of the column to default values.
\membersection{wxQueryCol::\destruct{wxQueryCol}}
\func{void}{\destruct{wxQueryCol}}{\void}
Destructor. Deletes the wxQueryField list.
\membersection{wxQueryCol::BindVar}
\func{void *}{BindVar}{\param{void *}{v}, \param{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 {\it sz} bytes).
\membersection{wxQueryCol::FillVar}
\func{void}{FillVar}{\param{int}{ recnum}}
Fills the bound variable with the data of the field recnum. When no variable
is bound to the column nothing will happen.
\membersection{wxQueryCol::GetData}
\func{void *}{GetData}{\param{int}{ field}}
Returns a pointer to the data of the field.
\membersection{wxQueryCol::GetName}
\func{wxString}{GetName}{\void}
Returns the name of a column.
\membersection{wxQueryCol::GetType}
\func{short}{GetType}{\void}
Returns the data type of a column.
\membersection{wxQueryCol::GetSize}
\func{long}{GetSize}{\param{int}{ field}}
Return the size of the data of the field field.
\membersection{wxQueryCol::IsRowDirty}
\func{bool}{IsRowDirty}{\param{int}{ field}}
Returns true if the given field has been changed, but not saved.
\membersection{wxQueryCol::IsNullable}
\func{bool}{IsNullable}{\void}
Returns true if a column may contain no data.
\membersection{wxQueryCol::AppendField}
\func{void}{AppendField}{\param{void *}{buf}, \param{long}{ len}}
Appends a wxQueryField instance to the field list of the column. {\it len} bytes from\rtfsp
{\it buf} will be copied into the field's buffer.
\membersection{wxQueryCol::SetData}
\func{bool}{SetData}{\param{int}{ field}, \param{void *}{buf}, \param{long}{ len}}
Sets the data of a field. This function finds the wxQueryField corresponding to\rtfsp
{\it field} and calls wxQueryField::SetData with {\it buf} and {\it len} arguments.
\membersection{wxQueryCol::SetName}
\func{void}{SetName}{\param{const wxString\& }{name}}
Sets the name of a column. Only useful when creating new tables or
appending columns.
\membersection{wxQueryCol::SetNullable}
\func{void}{SetNullable}{\param{bool}{ nullable}}
Determines whether a column may contain no data. Only useful when creating new tables or
appending columns.
\membersection{wxQueryCol::SetFieldDirty}
\func{void}{SetFieldDirty}{\param{int}{ field}, \param{bool }{dirty = true}}
Sets the dirty tag of a given field.
\membersection{wxQueryCol::SetType}
\func{void}{SetType}{\param{short}{ type}}
Sets the data type of a column. Only useful when creating new tables or
appending columns.
\section{\class{wxQueryField}}\label{wxqueryfield}
Represents the data item for one or several columns.
\wxheading{Derivation}
\helpref{wxObject}{wxobject}
\wxheading{See also}
\overview{wxQueryField overview}{wxqueryfieldoverview}, \overview{wxDatabase overview}{wxdatabaseoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxQueryField::wxQueryField}
\func{}{wxQueryField}{\void}
Constructor. Sets type and size of the field to default values.
\membersection{wxQueryField::\destruct{wxQueryField}}
\func{}{\destruct{wxQueryField}}{\void}
Destructor. Frees the associated memory depending on the field type.
\membersection{wxQueryField::AllocData}
\func{bool}{AllocData}{\void}
Allocates memory depending on the size and type of the field.
\membersection{wxQueryField::ClearData}
\func{void}{ClearData}{\void}
Deletes the contents of the field buffer without deallocating the memory.
\membersection{wxQueryField::GetData}
\func{void *}{GetData}{\void}
Returns a pointer to the field buffer.
\membersection{wxQueryField::GetSize}
\func{long}{GetSize}{\void}
Returns the size of the field buffer.
\membersection{wxQueryField::GetType}
\func{short}{GetType}{\void}
Returns the type of the field (currently SQL\_CHAR, SQL\_VARCHAR or SQL\_INTEGER).
\membersection{wxQueryField::IsDirty}
\func{bool}{IsDirty}{\void}
Returns true if the data of a field has been changed, but not saved.
\membersection{wxQueryField::SetData}
\func{bool}{SetData}{\param{void *}{data}, \param{long}{ sz}}
Allocates memory of the size {\it sz} and copies the contents of {\it d} into the
field buffer.
\membersection{wxQueryField::SetDirty}
\func{void}{SetDirty}{\param{bool}{ dirty = true}}
Sets the dirty tag of a field.
\membersection{wxQueryField::SetSize}
\func{void}{SetSize}{\param{long}{ size}}
Resizes the field buffer. Stored data will be lost.
\membersection{wxQueryField::SetType}
\func{void}{SetType}{\param{short }{type}}
Sets the type of the field. Currently the types SQL\_CHAR, SQL\_VARCHAR and
SQL\_INTEGER are supported.
|