EdoWork::SwapKey (Interface: EdoWork)
 
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
CreateEdoWork
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for an electronic document in the work file, which positions the file by a key that is unknown
pEdoWork->Browse (VARIANT_FALSE);
// Swap the key to 'EWK_STA' (2), positioning by the status
pEdoWork->SwapKey (2);
// Show the selected electronic document (you can then navigate through the file using the key 'EWK_STA')
pEdoWork->View ();

C#
 
// Browse for an electronic document in the work file, which positions the file by a key that is unknown
oEdoWork.Browse (false);
// Swap the key to 'EWK_STA' (2), positioning by the status
oEdoWork.SwapKey (2);
// Show the selected electronic document (you can then navigate through the file using the key 'EWK_STA')
oEdoWork.View ();

VBS
 
' Browse for an electronic document in the work file, which positions the file by a key that is unknown
Call oEdoWork.Browse(False)
' Swap the key to 'EWK_STA' (2), positioning by the status
Call oEdoWork.SwapKey(2)
' Show the selected electronic document (you can then navigate through the file using the key 'EWK_STA')
Call oEdoWork.View()

VB.NET
 
' Browse for an electronic document in the work file, which positions the file by a key that is unknown
oEdoWork.Browse(False)
' Swap the key to 'EWK_STA' (2), positioning by the status
oEdoWork.SwapKey(2)
' Show the selected electronic document (you can then navigate through the file using the key 'EWK_STA')
oEdoWork.View()