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