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