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