Venice
POrder::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
CreatePOrder
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for a purchase order, which positions the file by a key that is unknown
pPOrder->Browse (VARIANT_FALSE);
// Swap the key to 'PRH_NUM' (1), positioning by book and document number
pPOrder->SwapKey (1);
// Show the selected purchase order (you can then navigate through the file using the key 'PRH_NUM')
pPOrder->View ();

C#
 
// Browse for a purchase order, which positions the file by a key that is unknown
oPOrder.Browse (false);
// Swap the key to 'PRH_NUM' (1), positioning by book and document number
oPOrder.SwapKey (1);
// Show the selected purchase order (you can then navigate through the file using the key 'PRH_NUM')
oPOrder.View ();

VBS
 
' Browse for a purchase order, which positions the file by a key that is unknown
Call oPOrder.Browse(False)
' Swap the key to 'PRH_NUM' (1), positioning by book and document number
Call oPOrder.SwapKey(1)
' Show the selected purchase order (you can then navigate through the file using the key 'PRH_NUM')
Call oPOrder.View()

VB.NET
 
' Browse for a purchase order, which positions the file by a key that is unknown
oPOrder.Browse(False)
' Swap the key to 'PRH_NUM' (1), positioning by book and document number
oPOrder.SwapKey(1)
' Show the selected purchase order (you can then navigate through the file using the key 'PRH_NUM')
oPOrder.View()