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