AnaProp::SwapKey (Interface: AnaProp)
 
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
CreateAnaProp
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for an analytical accounting proposal, which positions the file by a key that is unknown
pAnaProp->Browse (VARIANT_FALSE);
// Swap the key to 'ANH_COD' (1), positioning by type and code
pAnaProp->SwapKey (1);
// Show the selected analytical accounting proposal (you can then navigate through the file using the key 'ANH_COD')
pAnaProp->View ();

C#
 
// Browse for an analytical accounting proposal, which positions the file by a key that is unknown
oAnaProp.Browse (false);
// Swap the key to 'ANH_COD' (1), positioning by type and code
oAnaProp.SwapKey (1);
// Show the selected analytical accounting proposal (you can then navigate through the file using the key 'ANH_COD')
oAnaProp.View ();

VBS
 
' Browse for an analytical accounting proposal, which positions the file by a key that is unknown
Call oAnaProp.Browse(False)
' Swap the key to 'ANH_COD' (1), positioning by type and code
Call oAnaProp.SwapKey(1)
' Show the selected analytical accounting proposal (you can then navigate through the file using the key 'ANH_COD')
Call oAnaProp.View()

VB.NET
 
' Browse for an analytical accounting proposal, which positions the file by a key that is unknown
oAnaProp.Browse(False)
' Swap the key to 'ANH_COD' (1), positioning by type and code
oAnaProp.SwapKey(1)
' Show the selected analytical accounting proposal (you can then navigate through the file using the key 'ANH_COD')
oAnaProp.View()