|
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 |
|
|
|
Samples |
|
|
C++ |
|
// Browse for an analytical unit entry, which positions the file by a key that is unknown
pAnUnt->Browse (VARIANT_FALSE);
// Swap the key to 'AUN_AK_' (5), positioning by unit and kind
pAnUnt->SwapKey (5);
// Navigate through the file using the key 'ACN_AK_'
while (pAnUnt->GetDBStatus () == 0)
{
// Process record data
pAnUnt->GetNext ();
}
|
|
|
C# |
|
// Browse for an analytical unit entry, which positions the file by a key that is unknown
oAnUnt.Browse (false);
// Swap the key to 'ACN_AK_' (5), positioning by unit and kind
oAnUnt.SwapKey (5);
// Navigate through the file using the key 'ACN_AK_'
while (oAnUnt.GetDBStatus () == 0)
{
// Process record data
oAnUnt.GetNext ();
}
|
|
|
VBS |
|
' Browse for an analytical unit entry, which positions the file by a key that is unknown
Call oAnUnt.Browse(False)
' Swap the key to 'ACN_AK_' (5), positioning by unit and kind
Call oAnUnt.SwapKey(5)
' Navigate through the file using the key 'ACN_AK_'
While oAnUnt.GetDBStatus() = 0
' Process record data
Call oAnUnt.GetNext()
Wend
|
|
|
VB.NET |
|
' Browse for an analytical unit entry, which positions the file by a key that is unknown
oAnUnt.Browse(False)
' Swap the key to 'ACN_AK_' (5), positioning by unit and kind
oAnUnt.SwapKey(5)
' Navigate through the file using the key 'ACN_AK_'
While oAnUnt.GetDBStatus() = 0
' Process record data
oAnUnt.GetNext()
End While
|
|