|
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 |
|
CreatePDeliv |
| 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 delivery, which positions the file by a key that is unknown
pPDeliv->Browse (VARIANT_FALSE);
// Swap the key to 'PDH_NUM' (1), positioning by book and document number
pPDeliv->SwapKey (1);
// Show the selected purchase delivery (you can then navigate through the file using the key 'PDH_NUM')
pPDeliv->View ();
|
|
|
C# |
|
// Browse for a purchase delivery, which positions the file by a key that is unknown
oPDeliv.Browse (false);
// Swap the key to 'PDH_NUM' (1), positioning by book and document number
oPDeliv.SwapKey (1);
// Show the selected purchase delivery (you can then navigate through the file using the key 'PDH_NUM')
oPDeliv.View ();
|
|
|
VBS |
|
' Browse for a purchase delivery, which positions the file by a key that is unknown
Call oPDeliv.Browse(False)
' Swap the key to 'PDH_NUM' (1), positioning by book and document number
Call oPDeliv.SwapKey(1)
' Show the selected purchase delivery (you can then navigate through the file using the key 'PDH_NUM')
Call oPDeliv.View()
|
|
|
VB.NET |
|
' Browse for a purchase delivery, which positions the file by a key that is unknown
oPDeliv.Browse(False)
' Swap the key to 'PDH_NUM' (1), positioning by book and document number
oPDeliv.SwapKey(1)
' Show the selected purchase delivery (you can then navigate through the file using the key 'PDH_NUM')
oPDeliv.View()
|
|