Table methods
Tables provide the following methods:
- Change()
- ChangeFirst()
- ChangeLast()
- ChangePrevious()
- Clear()
- Clone()
- Close()
- Fill()
- Get()
- GetFirst()
- GetLast()
- GetNext()
- GetPrevious()
- RangeClear()
- RangeEnd()
- RangeRemove()
- RangeStart()
- Release()
- Remove()
- Save()
Change()
The Change() method retrieves a row from the table and passively or actively locks the row, allowing changes to be made to it. The row retrieved is determined by the key specified for the table and the values that were specified for the key segments. The Change() method has one parameter:
ActiveLock - A optional boolean. The value true specifies that an active lock will be applied to the row. The value false (the default value) specifies that a passive lock will be applied.
ChangeFirst()
The ChangeFirst() method retrieves the first row from the table and passively or actively locks the row, allowing changes to be made to it. The row retrieved is determined by the key specified for the table. The ChangeFirst() method has one parameter:
ActiveLock - A optional boolean. The value true specifies that an active lock will be applied to the row. The value false (the default value) specifies that a passive lock will be applied.
ChangeLast()
The ChangeLast() method retrieves the last row from the table and passively or actively locks the row, allowing changes to be made to it. The row retrieved is determined by the key specified for the table. The ChangeLast() method has one parameter:
ActiveLock - A optional boolean. The value true specifies that an active lock will be applied to the row. The value false (the default value) specifies that a passive lock will be applied.
ChangeNext()
The ChangeNext() method retrieves the next row from the table and passively or actively locks the row, allowing changes to be made to it. The row retrieved is determined by the key specified for the table and the values of the key fields for the row currently in the table buffer. The ChangeNext() method has one parameter:
ActiveLock - A optional boolean. The value true specifies that an active lock will be applied to the row. The value false (the default value) specifies that a passive lock will be applied.
ChangePrevious()
The ChangePrevious() method retrieves the previous row from the table and passively or actively locks the row, allowing changes to be made to it. The row retrieved is determined by the key specified for the table and the values of the key fields for the row currently in the table buffer. The ChangePrevious() method has one parameter:
ActiveLock - A optional boolean. The value true specifies that an active lock will be applied to the row. The value false (the default value) specifies that a passive lock will be applied.
Clear()
The Clear() method sets all of the fields in the table buffer to their cleared values. The following table lists the cleared value for standard datatypes:
Datatype |
Cleared value |
---|---|
Date |
0/0/0 |
Currency |
0 |
Integer |
0 |
Long |
0 |
String |
Empty string |
Time |
000000 which corresponds to 12:00:00 AM |
Clone()
The Clone() method creates a new instance of a global table buffer for a table. This new table buffer instance is not shared, so it is not accessible by other Visual Studio Tools add-ins. The Clone() method has no effect when when with form-level table buffers.
Close()
The Close() method closes the table buffer.
Fill()
The Fill() method sets all of the fields in the table buffer to their maximum values. The following table lists the filled value for standard datatypes:
Datatype |
Filled value |
---|---|
Date |
12/31/9999 |
Currency |
99999999999999.99999 |
Integer |
32,767 |
Long |
2,147,483,647 |
String |
The length byte (first byte) of the string is set to the storage size of the string minus 1. Each of the remaining bytes is set to string equivalent of ASCII 255. |
Time |
23:59:59 |
Get()
The Get() method retrieves a row from the table. No lock is applied to the row. The row retrieved is determined by the key specified for the table and the values that were specified for the key segments.
GetFirst()
The GetFirst() method retrieves the first row from the table. No lock is applied to the row. The row retrieved is determined by the key specified for the table.
GetLast()
The GetLast() method retrieves the last row from the table. No lock is applied to the row. The row retrieved is determined by the key specified for the table.
GetNext()
The GetNext() method retrieves the next row from the table. No lock is applied to the row. The row retrieved is determined by the key specified for the table and the values of the key fields for the row currently in the table buffer.
GetPrevious()
The GetPrevious() method retrieves the previous row from the table. No lock is applied to the row. The row retrieved is determined by the key specified for the table and the values of the key fields for the row currently in the table buffer.
RangeClear()
The RangeClear() method removes the range that was specified for the table.
RangeEnd()
The RangeEnd() method specifies the current values of the key segments in the table buffer as the end of the range of rows in the table. The Key property specifies which key will be used for the range.
RangeRemove()
The RangeRemove() method attempts to delete all of the rows in the current range from the table.
RangeStart()
The RangeStart() method specifies the current values of the key segments in the table buffer as the beginning of the range of rows in the table. The Key property specifies which key will be used for the range.
Release()
The Release() method releases any passive or active lock for a row in the table buffer. The row values remain in the table buffer.
Remove()
The Remove() method deletes the current row in the table buffer from the table. The row must be passivly or actively locked before it can be deleted.
Save()
The Save() method saves the values currently in the table buffer to the table. If the row is locked in the table buffer, it will be updated. If no row in the table is locked, a new row will be added.