1 \section{\class{wxQueryCol
}}\label{wxquerycol
}
3 Every ODBC data column is represented by an instance of this class.
5 \wxheading{Derived from
}
7 \helpref{wxObject
}{wxobject
}
9 \wxheading{Include files
}
15 \overview{wxQueryCol overview
}{wxquerycoloverview
},
\overview{wxDatabase overview
}{wxdatabaseoverview
}
17 \latexignore{\rtfignore{\wxheading{Members
}}}
19 \membersection{wxQueryCol::wxQueryCol
}
21 \func{void
}{wxQueryCol
}{\void}
23 Constructor. Sets the attributes of the column to default values.
25 \membersection{wxQueryCol::
\destruct{wxQueryCol
}}
27 \func{void
}{\destruct{wxQueryCol
}}{\void}
29 Destructor. Deletes the wxQueryField list.
31 \membersection{wxQueryCol::BindVar
}
33 \func{void *
}{BindVar
}{\param{void *
}{v
},
\param{long
}{ sz
}}
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).
39 \membersection{wxQueryCol::FillVar
}
41 \func{void
}{FillVar
}{\param{int
}{ recnum
}}
43 Fills the bound variable with the data of the field recnum. When no variable
44 is bound to the column nothing will happen.
46 \membersection{wxQueryCol::GetData
}
48 \func{void *
}{GetData
}{\param{int
}{ field
}}
50 Returns a pointer to the data of the field.
52 \membersection{wxQueryCol::GetName
}
54 \func{wxString
}{GetName
}{\void}
56 Returns the name of a column.
58 \membersection{wxQueryCol::GetType
}
60 \func{short
}{GetType
}{\void}
62 Returns the data type of a column.
64 \membersection{wxQueryCol::GetSize
}
66 \func{long
}{GetSize
}{\param{int
}{ field
}}
68 Return the size of the data of the field field.
70 \membersection{wxQueryCol::IsRowDirty
}
72 \func{bool
}{IsRowDirty
}{\param{int
}{ field
}}
74 Returns TRUE if the given field has been changed, but not saved.
76 \membersection{wxQueryCol::IsNullable
}
78 \func{bool
}{IsNullable
}{\void}
80 Returns TRUE if a column may contain no data.
82 \membersection{wxQueryCol::AppendField
}
84 \func{void
}{AppendField
}{\param{void *
}{buf
},
\param{long
}{ len
}}
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.
89 \membersection{wxQueryCol::SetData
}
91 \func{bool
}{SetData
}{\param{int
}{ field
},
\param{void *
}{buf
},
\param{long
}{ len
}}
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.
96 \membersection{wxQueryCol::SetName
}
98 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
100 Sets the name of a column. Only useful when creating new tables or
103 \membersection{wxQueryCol::SetNullable
}
105 \func{void
}{SetNullable
}{\param{bool
}{ nullable
}}
107 Determines whether a column may contain no data. Only useful when creating new tables or
110 \membersection{wxQueryCol::SetFieldDirty
}
112 \func{void
}{SetFieldDirty
}{\param{int
}{ field
},
\param{bool
}{dirty = TRUE
}}
114 Sets the dirty tag of a given field.
116 \membersection{wxQueryCol::SetType
}
118 \func{void
}{SetType
}{\param{short
}{ type
}}
120 Sets the data type of a column. Only useful when creating new tables or
123 \section{\class{wxQueryField
}}\label{wxqueryfield
}
125 Represents the data item for one or several columns.
127 \wxheading{Derivation
}
129 \helpref{wxObject
}{wxobject
}
133 \overview{wxQueryField overview
}{wxqueryfieldoverview
},
\overview{wxDatabase overview
}{wxdatabaseoverview
}
135 \latexignore{\rtfignore{\wxheading{Members
}}}
137 \membersection{wxQueryField::wxQueryField
}
139 \func{}{wxQueryField
}{\void}
141 Constructor. Sets type and size of the field to default values.
143 \membersection{wxQueryField::
\destruct{wxQueryField
}}
145 \func{}{\destruct{wxQueryField
}}{\void}
147 Destructor. Frees the associated memory depending on the field type.
149 \membersection{wxQueryField::AllocData
}
151 \func{bool
}{AllocData
}{\void}
153 Allocates memory depending on the size and type of the field.
155 \membersection{wxQueryField::ClearData
}
157 \func{void
}{ClearData
}{\void}
159 Deletes the contents of the field buffer without deallocating the memory.
161 \membersection{wxQueryField::GetData
}
163 \func{void *
}{GetData
}{\void}
165 Returns a pointer to the field buffer.
167 \membersection{wxQueryField::GetSize
}
169 \func{long
}{GetSize
}{\void}
171 Returns the size of the field buffer.
173 \membersection{wxQueryField::GetType
}
175 \func{short
}{GetType
}{\void}
177 Returns the type of the field (currently SQL
\_CHAR, SQL
\_VARCHAR or SQL
\_INTEGER).
179 \membersection{wxQueryField::IsDirty
}
181 \func{bool
}{IsDirty
}{\void}
183 Returns TRUE if the data of a field has been changed, but not saved.
185 \membersection{wxQueryField::SetData
}
187 \func{bool
}{SetData
}{\param{void *
}{data
},
\param{long
}{ sz
}}
189 Allocates memory of the size
{\it sz
} and copies the contents of
{\it d
} into the
192 \membersection{wxQueryField::SetDirty
}
194 \func{void
}{SetDirty
}{\param{bool
}{ dirty = TRUE
}}
196 Sets the dirty tag of a field.
198 \membersection{wxQueryField::SetSize
}
200 \func{void
}{SetSize
}{\param{long
}{ size
}}
202 Resizes the field buffer. Stored data will be lost.
204 \membersection{wxQueryField::SetType
}
206 \func{void
}{SetType
}{\param{short
}{type
}}
208 Sets the type of the field. Currently the types SQL
\_CHAR, SQL
\_VARCHAR and
209 SQL
\_INTEGER are supported.