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