|
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 a purchase delivery detail line, which positions the file by a key that is unknown
pPDelivDet->Browse (VARIANT_FALSE);
// Swap the key to 'PDD_LNE' (1), positioning by document
pPDelivDet->SwapKey (1);
// Navigate through the file using the key 'PDD_LNE'
while (pPDelivDet->GetDBStatus () == 0)
{
// Process record data
pPDelivDet->GetNext ();
}
|
|
|
C# |
|
// Browse for a purchase delivery detail line, which positions the file by a key that is unknown
oPDelivDet.Browse (false);
// Swap the key to 'PDD_LNE' (1), positioning by document
oPDelivDet.SwapKey (1);
// Navigate through the file using the key 'PDD_LNE'
while (oPDelivDet.GetDBStatus () == 0)
{
// Process record data
oPDelivDet.GetNext ();
}
|
|
|
VBS |
|
' Browse for a purchase delivery detail line, which positions the file by a key that is unknown
Call oPDelivDet.Browse(False)
' Swap the key to 'PDD_LNE' (1), positioning by document
Call oPDelivDet.SwapKey(1)
' Navigate through the file using the key 'PDD_LNE'
While oPDelivDet.GetDBStatus() = 0
' Process record data
Call oPDelivDet.GetNext()
Wend
|
|
|
VB.NET |
|
' Browse for a purchase delivery detail line, which positions the file by a key that is unknown
oPDelivDet.Browse(False)
' Swap the key to 'PDD_LNE' (1), positioning by document
oPDelivDet.SwapKey(1)
' Navigate through the file using the key 'PDD_LNE'
While oPDelivDet.GetDBStatus() = 0
' Process record data
oPDelivDet.GetNext()
End While
|
|