Venice
Balan::SwapKey
 
Swaps the file to another key.
 
VARIANT_BOOL SwapKey (
    SHORT sKeyNum
)
 
Parameters
sKeyNum
[in] The number of the key by which you want the file positioned.
 
Return value
True if the file was positioned according to the given key, otherwise false (e.g. if the current record is a null value for the given key or if an invalid sKeyNum was supplied).
 
See Also
CreateBalan
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for a monthly balance, which positions the file by a key that is unknown
pBalan->Browse (VARIANT_FALSE);
// Swap the key to 'BAL_SYS' (0), positioning by the system number
pBalan->SwapKey (0);
// Show the selected monthly balance (you can then navigate through the file using the key 'BAL_SYS')
pBalan->View ();

C#
 
// Browse for a monthly balance, which positions the file by a key that is unknown
oBalan.Browse (false);
// Swap the key to 'BAL_SYS' (0), positioning by the system number
oBalan.SwapKey (0);
// Show the selected monthly balance (you can then navigate through the file using the key 'BAL_SYS')
oBalan.View ();

VBS
 
' Browse for a monthly balance, which positions the file by a key that is unknown
Call oBalan.Browse(False)
' Swap the key to 'BAL_SYS' (0), positioning by the system number
Call oBalan.SwapKey(0)
' Show the selected monthly balance (you can then navigate through the file using the key 'BAL_SYS')
Call oBalan.View()

VB.NET
 
' Browse for a monthly balance, which positions the file by a key that is unknown
oBalan.Browse(False)
' Swap the key to 'BAL_SYS' (0), positioning by the system number
oBalan.SwapKey(0)
' Show the selected monthly balance (you can then navigate through the file using the key 'BAL_SYS')
oBalan.View()