Page 266 - Open Soource Technologies 304.indd
P. 266
Event Driven Programming
CursorType Indicates the type of cursor used in a Recordset object.
EditMode Indicates the editing status of the current record.
EOF Indicates that the current record position is after the last record in a
Recordset object.
LockType Indicates the type of locks placed on records during editing.
PageCount Indicates how many pages of data the Recordset object contains.
PageSize Indicates how many records constitute one page in the recordset.
RecordCount Returns a Long value that indicates the current number of records in a
Recordset object.
Source Indicates the source for the data in a Recordset object—SQL statement or
table name.
Field objects should not be directly created because they exist only in the context of an existing
recordset. Use the Set function to refer to a specific Field object. The Field object has no methods
or events. With the exception of the Value property, all the properties are read-only.
Table 12.3: Properties that the Field object supports
Property Description
ActualSize Indicates the actual length, in bytes, of a field’s value.
Attributes Returns a value that indicates one or more characteristics of a Field object.
DefinedSize Used to determine the data capacity of a Field object. It returns the defined
size, in characters, of the field Compare with ActualSize, which returns the
size in bytes.
Name Returns the name of a field.
Type Indicates the data type of a Field object.
UnderlyingValue Indicates a Field object’s current value in the database.
Value (default) Indicates a Field object’s current value in the recordset.
The Fields collection contains a Field object for each column in the recordset. You can refer to
a particular field by name or by index. The Fields collection supports the Count property, which
indicates the number of fields in a recordset.
12.1.1 Using ADOCE
With ADOCE, you can move databases to and from your Windows CE-based device. You can also
create and access databases on the device and on an emulator on a desktop computer. The
following sections describe how to use ADOCE and show examples. Note that ControlConsts.bas
is installed in \Program Files\Microsoft Visual Studio\VB98\VBCE\Samples. This file contains
the definitions for the enumerations in ADOCE and other controls
1. Other Methods for Opening a Recordset The section titled “Accessing
Data with the Execute Direct Model” in the following chapter discusses
how to use the Execute method of ADO Connection and Command
objects to open a Recordset.
260 LOVELY PROFESSIONAL UNIVERSITY