Venice
MaCrd::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
CreateMaCrd
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for a material assets card, which positions the file by a key that is unknown
pMaCrd->Browse (VARIANT_FALSE);
// Swap the key to 'MCR_COD' (1), positioning by the material assets card code
pMaCrd->SwapKey (1);
// Show the selected material assets card (you can then navigate through the file using the key 'MCR_COD')
pMaCrd->View ();

C#
 
// Browse for a material assets card, which positions the file by a key that is unknown
oMaCrd.Browse (false);
// Swap the key to 'MCR_COD' (1), positioning by the material assets card code
oMaCrd.SwapKey (1);
// Show the selected material assets card (you can then navigate through the file using the key 'MCR_COD')
oMaCrd.View ();

VBS
 
' Browse for a material assets card, which positions the file by a key that is unknown
Call oMaCrd.Browse(False)
' Swap the key to 'MCR_COD' (1), positioning by the material assets card code
Call oMaCrd.SwapKey(1)
' Show the selected material assets card (you can then navigate through the file using the key 'MCR_COD')
Call oMaCrd.View()

VB.NET
 
' Browse for a material assets card, which positions the file by a key that is unknown
oMaCrd.Browse(False)
' Swap the key to 'MCR_COD' (1), positioning by the material assets card code
oMaCrd.SwapKey(1)
' Show the selected material assets card (you can then navigate through the file using the key 'MCR_COD')
oMaCrd.View()