|
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 |
|
CreateCntry |
| Browse |
| View |
| The possible keys (and their numerical value) can be found in the SeekBy-methods of this interface. |
|
|
|
Samples |
|
|
C++ |
|
// Browse for a country card, which positions the file by a key that is unknown
pCntry->Browse (VARIANT_FALSE);
// Swap the key to 'CNT_NAN' (5), positioning by the Dutch name
pCntry->SwapKey (5);
// Show the selected country cards (you can then navigate through the file using the key 'CNT_NAN')
pCntry->View ();
|
|
|
C# |
|
// Browse for a country card, which positions the file by a key that is unknown
oCntry.Browse (false);
// Swap the key to 'CNT_NAN' (5), positioning by the Dutch name
oCntry.SwapKey (5);
// Show the selected country cards (you can then navigate through the file using the key 'CNT_NAN')
oCntry.View ();
|
|
|
VBS |
|
' Browse for a country card, which positions the file by a key that is unknown
Call oCntry.Browse(False)
' Swap the key to 'CNT_NAN' (5), positioning by the Dutch name
Call oCntry.SwapKey(5)
' Show the selected country cards (you can then navigate through the file using the key 'CNT_NAN')
Call oCntry.View()
|
|
|
VB.NET |
|
' Browse for a country card, which positions the file by a key that is unknown
oCntry.Browse(False)
' Swap the key to 'CNT_NAN' (5), positioning by the Dutch name
oCntry.SwapKey(5)
' Show the selected country cards (you can then navigate through the file using the key 'CNT_NAN')
oCntry.View()
|
|