|
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++ |
|
// Seek the purchase offer detail line with system number 17
if (pPOfferDet->SeekBySysNum (smEqual, 17))
{
// Swap the key to 'POD_LNE' (1), positioning by document
pPOfferDet->SwapKey (1);
// Navigate through the file using the key 'POD_LNE'
while (pPOfferDet->GetDBStatus () == 0)
{
// Process record data
pPOfferDet->GetNext ();
}
}
|
|
|
C# |
|
// Seek the purchase offer detail line with system number 17
if (oPOfferDet.SeekBySysNum (eSeekMode.smEqual, 17))
{
// Swap the key to 'POD_LNE' (1), positioning by document
oPOfferDet.SwapKey (1);
// Navigate through the file using the key 'POD_LNE'
while (oPOfferDet.GetDBStatus () == 0)
{
// Process record data
oPOfferDet.GetNext ();
}
}
|
|
|
VBS |
|
' Seek the purchase offer detail line with system number 17
If oPOfferDet.SeekBySysNum(smEqual, 17) Then
' Swap the key to 'POD_LNE' (1), positioning by document
Call oPOfferDet.SwapKey(1)
' Navigate through the file using the key 'POD_LNE'
While oPOfferDet.GetDBStatus() = 0
' Process record data
Call oPOfferDet.GetNext()
Wend
End If
|
|
|
VB.NET |
|
' Seek the purchase offer detail line with system number 17
If oPOfferDet.SeekBySysNum(eSeekMode.smEqual, 17) Then
' Swap the key to 'SRD_LNE' (1), positioning by document
oPOfferDet.SwapKey(1)
' Navigate through the file using the key 'SRD_LNE'
While oPOfferDet.GetDBStatus() = 0
' Process record data
oPOfferDet.GetNext()
End While
End If
|
|