ArtLoc::SwapKey (Interface: ArtLoc)
 
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
CreateArtLoc
Browse
View
The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface.
 
Samples
 
C++
 
// Browse for an article location, which positions the file by a key that is unknown
pArtLoc->Browse (VARIANT_FALSE);
// Swap the key to 'ALO_ART' (1), positioning by the article number
pArtLoc->SwapKey (1);
// Show the selected article location (you can then navigate through the file using the key 'ALO_ART')
pArtLoc->View ();

C#
 
// Browse for an article location, which positions the file by a key that is unknown
oArtLoc.Browse (false);
// Swap the key to 'ALO_ART' (1), positioning by the article number
oArtLoc.SwapKey (1);
// Show the selected article location (you can then navigate through the file using the key 'ALO_ART')
oArtLoc.View ();

VBS
 
' Browse for an article location, which positions the file by a key that is unknown
Call oArtLoc.Browse(False)
' Swap the key to 'ALO_ART' (1), positioning by the article number
Call oArtLoc.SwapKey(1)
' Show the selected article location (you can then navigate through the file using the key 'ALO_ART')
Call oArtLoc.View()

VB.NET
 
' Browse for an article location, which positions the file by a key that is unknown
oArtLoc.Browse(False)
' Swap the key to 'ALO_ART' (1), positioning by the article number
oArtLoc.SwapKey(1)
' Show the selected article location (you can then navigate through the file using the key 'ALO_ART')
oArtLoc.View()