66 lines
2.6 KiB
Text
66 lines
2.6 KiB
Text
.topic ctrl.data
|
|
.title Data
|
|
.toc 1 Data Controls
|
|
.toc 1 Data
|
|
.index Data
|
|
.index Database
|
|
.index SQLite
|
|
.index DatabaseName
|
|
.index RecordSource
|
|
.index MoveFirst
|
|
.index MoveNext
|
|
.index AddNew
|
|
.index Reposition
|
|
.index Validate
|
|
|
|
.h1 Data
|
|
|
|
VB Equivalent: Data -- DVX Widget: data (database record navigator)
|
|
|
|
A data access control that connects to a SQLite database and provides record navigation. Other controls can bind to a Data control via their DataSource and DataField properties.
|
|
|
|
.link ctrl.databinding See Data Binding for details
|
|
|
|
.h2 Type-Specific Properties
|
|
|
|
.table
|
|
Property Type R/W Description
|
|
------------ ------- --- -------------------------------------------
|
|
DatabaseName String R/W Path to the SQLite database file.
|
|
RecordSource String R/W Table name or SQL SELECT query for the recordset.
|
|
KeyColumn String R/W Primary key column name (used for UPDATE/DELETE operations).
|
|
Caption String R/W Text displayed on the navigator bar.
|
|
BOF Boolean R True if the current position is before the first record (read-only).
|
|
EOF Boolean R True if the current position is past the last record (read-only).
|
|
MasterSource String R/W Name of a master Data control (for master-detail binding).
|
|
MasterField String R/W Column in the master recordset to filter by.
|
|
DetailField String R/W Column in this recordset that matches the master field.
|
|
.endtable
|
|
|
|
.h2 Type-Specific Methods
|
|
|
|
.table
|
|
Method Parameters Description
|
|
------------ ---------- -------------------------------------------
|
|
MoveFirst (none) Navigate to the first record.
|
|
MoveLast (none) Navigate to the last record.
|
|
MoveNext (none) Navigate to the next record.
|
|
MovePrevious (none) Navigate to the previous record.
|
|
AddNew (none) Add a new blank record.
|
|
Delete (none) Delete the current record.
|
|
Refresh (none) Re-query the database and reload records.
|
|
Update (none) Write pending changes to the database.
|
|
.endtable
|
|
|
|
.h2 Type-Specific Events
|
|
|
|
.table
|
|
Event Parameters Description
|
|
---------- ----------------- -------------------------------------------
|
|
Reposition (none) Fires after the current record changes (navigation). This is the default event.
|
|
Validate Cancel As Integer Fires before writing a record. Set Cancel = 1 to abort.
|
|
.endtable
|
|
|
|
.link ctrl.common.props Common Properties, Events, and Methods
|
|
.link ctrl.databinding Data Binding
|
|
.link ctrl.dbgrid DBGrid
|