Difference between revisions of "CursorAdapter"
From Lianjapedia
Helen.george (Talk | contribs) |
Helen.george (Talk | contribs) |
||
| Line 11: | Line 11: | ||
!width="50%"|Description | !width="50%"|Description | ||
|- | |- | ||
| − | | | + | |Alias |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|RW | |RW | ||
|Character | |Character | ||
| − | | | + | |Alias name |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|AllowDelete |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Boolean |
| − | |valign="top"| | + | |valign="top"|Whether delete operations are allowed |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|AllowInsert |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Boolean |
| − | |valign="top"| | + | |valign="top"|Whether insert operations are allowed |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|AllowSimultaneousFetch |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Boolean |
| − | |valign="top"| | + | |valign="top"|Whether simultaneous fetch operations are allowed |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|AllowUpdate |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Boolean |
| − | |valign="top"| | + | |valign="top"|Whether update operations are allowed |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|BatchUpdateCount |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
| − | |valign="top"| | + | |valign="top"|Number of update statements sent |
|- | |- | ||
| − | | | + | |valign="top"|BreakOnError |
| − | |RW | + | |valign="top"|RW |
| − | | | + | |valign="top"|Boolean |
| − | | | + | |valign="top"|Whether errors break program execution |
|- | |- | ||
| − | | | + | |valign="top"|CompareMemo |
| − | |RW | + | |valign="top"|RW |
| − | | | + | |valign="top"|Boolean |
| − | | | + | |valign="top"|Whether memos are included in where update clauses |
|- | |- | ||
| − | | | + | |valign="top"|ConversionFunc |
| − | |RW | + | |valign="top"|RW |
| − | |Character | + | |valign="top"|Character |
| − | | | + | |valign="top"|Comma-separated list of field and function name pairs |
|- | |- | ||
| − | | | + | |valign="top"|CursorSchema |
| − | | | + | |valign="top"|RW |
| − | | | + | |valign="top"|Character |
| − | | | + | |valign="top"|Structure of the cursor |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | | | + | |
|- | |- | ||
|Database | |Database | ||
| Line 76: | Line 66: | ||
|Database name | |Database name | ||
|- | |- | ||
| − | | | + | |DataSource |
|RW | |RW | ||
|Character | |Character | ||
| − | | | + | |Source of data |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|DataSourceHost |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Character | |valign="top"|Character | ||
| − | |valign="top"| | + | |valign="top"|Hostname or IP for DataSource |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|DataSourceOptions |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Character | |valign="top"|Character | ||
| − | |valign="top"| | + | |valign="top"|Options string for DataSource |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|DataSourcePassword |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Character | |valign="top"|Character | ||
| − | |valign="top"| | + | |valign="top"|Password for DataSource |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|DataSourcePort |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Numeric |
| − | |valign="top"| | + | |valign="top"|Port number for DataSource |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|DataSourceType |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Character |
| − | |valign="top"| | + | |valign="top"|Type of the DataSource: "" (native) or "ODBC" |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|DataSourceUsername |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Character |
| − | |valign="top"| | + | |valign="top"|Username for DataSource |
|- | |- | ||
| − | | | + | |DeleteCmd |
| − | + | |RW | |
| − | | | + | |Character |
| − | | | + | |Delete command string |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
|valign="top"|FetchAsNeeded | |valign="top"|FetchAsNeeded | ||
| Line 140: | Line 115: | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
|valign="top"|Number of rows fetched | |valign="top"|Number of rows fetched | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
|valign="top"|Flags | |valign="top"|Flags | ||
| Line 151: | Line 121: | ||
|valign="top"|Flag settings | |valign="top"|Flag settings | ||
|- | |- | ||
| − | | | + | |InsertCmd |
| − | + | |RW | |
| − | | | + | |Character |
| − | | | + | |Insert command string |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|KeyFieldList |
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Character |
| − | |valign="top"| | + | |valign="top"|Comma-separated list of primary fields |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|MaxRecords |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
| − | |valign="top"| | + | |valign="top"|Maximum number of rows returned |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|Prepared |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Boolean | |valign="top"|Boolean | ||
| − | |valign="top"|Whether | + | |valign="top"|Whether to prepare SQL statements for subsequent requery |
| + | |- | ||
| + | |SelectCmd | ||
| + | |RW | ||
| + | |Character | ||
| + | |Select command string | ||
|- | |- | ||
|valign="top"|SendUpdates | |valign="top"|SendUpdates | ||
| Line 176: | Line 151: | ||
|valign="top"|Whether to send an update query | |valign="top"|Whether to send an update query | ||
|- | |- | ||
| − | |valign="top"| | + | |Table |
| + | |RW | ||
| + | |Character | ||
| + | |Table name | ||
| + | |- | ||
| + | |valign="top"|Tables | ||
|valign="top"|RW | |valign="top"|RW | ||
| − | |valign="top"| | + | |valign="top"|Character |
| − | |valign="top"| | + | |valign="top"|Comma-separated list of table names |
|- | |- | ||
| − | |valign="top"| | + | |valign="top"|UpdatableFieldList |
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Character | |valign="top"|Character | ||
| − | |valign="top"|Comma-separated list of | + | |valign="top"|Comma-separated list of fields |
|- | |- | ||
| − | |valign="top"| | + | |UpdateCmd |
| + | |RW | ||
| + | |Character | ||
| + | |Update command string | ||
| + | |- | ||
| + | |valign="top"|UpdateNameList | ||
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Character | |valign="top"|Character | ||
| − | |valign="top"| | + | |valign="top"|Comma-separated list of pairs of local and remote field names |
| + | |- | ||
| + | |valign="top"|UpdateType | ||
| + | |valign="top"|RW | ||
| + | |valign="top"|Numeric | ||
| + | |valign="top"|Type of update: 1 = update old data with new data, 2 = delete old data and insert new data | ||
| + | |- | ||
| + | |valign="top"|UseMemoSize | ||
| + | |valign="top"|RW | ||
| + | |valign="top"|Numeric | ||
| + | |valign="top"|Minimum size in bytes for returning a value as a memo field | ||
| + | |- | ||
| + | |valign="top"|WhereType | ||
| + | |valign="top"|RW | ||
| + | |valign="top"|Numeric | ||
| + | |valign="top"|Type of fields used for where clauses: 1 = KeyFieldList, 2 = KeyFieldList and updatable fields, 3 = KeyFieldList and modified fields, 4 = KeyFieldList and comparison of time stamps | ||
|- | |- | ||
|} | |} | ||
| Line 201: | Line 201: | ||
!Args | !Args | ||
!width="50%"|Description | !width="50%"|Description | ||
| + | |- | ||
| + | |Cancel | ||
| + | |None | ||
| + | |Cancel transaction | ||
| + | |- | ||
| + | |Close | ||
| + | |None | ||
| + | |Close the DataSource | ||
| + | |- | ||
| + | |Commit | ||
| + | |None | ||
| + | |Commit transaction data changes | ||
|- | |- | ||
|valign="top"|CursorFill | |valign="top"|CursorFill | ||
| Line 209: | Line 221: | ||
|valign="top"|None | |valign="top"|None | ||
|valign="top"|Refresh the cursor based on Select Cmd | |valign="top"|Refresh the cursor based on Select Cmd | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
|valign="top2|Exec | |valign="top2|Exec | ||
| Line 222: | Line 226: | ||
|valign="top"|Execute the specified command | |valign="top"|Execute the specified command | ||
|- | |- | ||
| − | | | + | |Open |
|None | |None | ||
| − | | | + | |Open the DataSource |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
|Rollback | |Rollback | ||
| Line 234: | Line 234: | ||
|Rollback transaction data changes | |Rollback transaction data changes | ||
|- | |- | ||
| − | | | + | |Transaction |
|None | |None | ||
| − | | | + | |Begin transaction |
|- | |- | ||
|} | |} | ||
Revision as of 09:06, 10 April 2013
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Properties
This class supports the Common Properties plus the following:
| Property | Access (R/RW) | Value | Description |
|---|---|---|---|
| Alias | RW | Character | Alias name |
| AllowDelete | RW | Boolean | Whether delete operations are allowed |
| AllowInsert | RW | Boolean | Whether insert operations are allowed |
| AllowSimultaneousFetch | RW | Boolean | Whether simultaneous fetch operations are allowed |
| AllowUpdate | RW | Boolean | Whether update operations are allowed |
| BatchUpdateCount | RW | Numeric | Number of update statements sent |
| BreakOnError | RW | Boolean | Whether errors break program execution |
| CompareMemo | RW | Boolean | Whether memos are included in where update clauses |
| ConversionFunc | RW | Character | Comma-separated list of field and function name pairs |
| CursorSchema | RW | Character | Structure of the cursor |
| Database | RW | Character | Database name |
| DataSource | RW | Character | Source of data |
| DataSourceHost | RW | Character | Hostname or IP for DataSource |
| DataSourceOptions | RW | Character | Options string for DataSource |
| DataSourcePassword | RW | Character | Password for DataSource |
| DataSourcePort | RW | Numeric | Port number for DataSource |
| DataSourceType | RW | Character | Type of the DataSource: "" (native) or "ODBC" |
| DataSourceUsername | RW | Character | Username for DataSource |
| DeleteCmd | RW | Character | Delete command string |
| FetchAsNeeded | RW | Boolean | Whether records are fetched as needed |
| FetchSize | RW | Numeric | Number of rows fetched |
| Flags | RW | Numeric | Flag settings |
| InsertCmd | RW | Character | Insert command string |
| KeyFieldList | RW | Character | Comma-separated list of primary fields |
| MaxRecords | RW | Numeric | Maximum number of rows returned |
| Prepared | RW | Boolean | Whether to prepare SQL statements for subsequent requery |
| SelectCmd | RW | Character | Select command string |
| SendUpdates | RW | Boolean | Whether to send an update query |
| Table | RW | Character | Table name |
| Tables | RW | Character | Comma-separated list of table names |
| UpdatableFieldList | RW | Character | Comma-separated list of fields |
| UpdateCmd | RW | Character | Update command string |
| UpdateNameList | RW | Character | Comma-separated list of pairs of local and remote field names |
| UpdateType | RW | Numeric | Type of update: 1 = update old data with new data, 2 = delete old data and insert new data |
| UseMemoSize | RW | Numeric | Minimum size in bytes for returning a value as a memo field |
| WhereType | RW | Numeric | Type of fields used for where clauses: 1 = KeyFieldList, 2 = KeyFieldList and updatable fields, 3 = KeyFieldList and modified fields, 4 = KeyFieldList and comparison of time stamps |
Methods
This class supports the Common Methods plus the following:
| Method | Args | Description |
|---|---|---|
| Cancel | None | Cancel transaction |
| Close | None | Close the DataSource |
| Commit | None | Commit transaction data changes |
| CursorFill | None | Fill the cursor based on Select Cmd |
| CursorRefresh | None | Refresh the cursor based on Select Cmd |
| Exec | command as Character | Execute the specified command |
| Open | None | Open the DataSource |
| Rollback | None | Rollback transaction data changes |
| Transaction | None | Begin transaction |
Events
This class supports the Common Events plus the following:
| Event | Args | Description |
|---|---|---|
| afterCursorAttach | alias as Character | Occurs after cursoradapter is open |
| afterCursorClose | alias as Character | Occurs after cursoradapter is closed and after afterCursorDetach |
| afterCursorDetach | alias as Character | Occurs after cursoradapter is closed |
| afterCursorFill | cursorSchema as Character | Occurs after cursor is filled |
| afterCursorOpen | alias as Character | Occurs after cursoradapter is open and afterCursorAttach |
| afterCursorRefresh | alias as Character, refreshed as Boolean | Occurs after cursor is refreshed |
| afterCursorUpdate | rows as Numeric, result as Boolean, error as Character | Occurs after cursor is updated |
| afterDelete | fieldstate as Character, force as Boolean, deleteCmd as Character, deleted as Boolean | Occurs after delete operation is performed |
| afterInsert | fieldstate as Character, force as Boolean, insertCmd as Character, inserted as Boolean | Occurs after insert operation is performed |
| afterUpdate | fieldstate as Character, force as Boolean, insertCmd as Character, inserted as Boolean | Occurs after update operation is performed |
| beforeCursorAttach | alias as Character | Occurs before cursor is open and after beforeCursorOpen |
| beforeCursorClose | alias as Character | Occurs when close method is called |
| beforeCursorDetach | alias as Character | Occurs before cursoradapter is closed and after beforeCursorClose |
| beforeCursorFill | cursorSchema as Character, noDataOnLoad as Boolean, selectCmd as Character | Occurs before when cursorFill method is called |
| beforeCursorOpen | alias as Character | Occurs when open method is called |
| beforeCursorRefresh | alias as Character | Occurs when cursorRefresh method is called |
| beforeCursorUpdate | rows as Numeric, force as Boolean | Occurs before cursor is updated |
| beforeDelete | fieldstate as Character, force as Boolean, deleteCmd as Character | Occurs before delete operation is performed |
| beforeInsert | fieldstate as Character, force as Boolean, deleteCmd as Character | Occurs before insert operation is performed |
| beforeUpdate | fieldstate as Character, force as Boolean, deleteCmd as Character | Occurs before update operation is performed |