DbServer.OrderSkipUnique Method | ![X#](../icons/logo100.jpg) |
Move the record pointer to the next or previous unique key in the controlling order.
Namespace:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD OrderSkipUnique(
nDirection
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual OrderSkipUnique(
Usual nDirection = default
)
Request Example
View SourceParameters
- nDirection (Optional)
- Type: Usual
Specifies whether the method will skip to the next or previous key. Omitting this value or specifying it as 1 skips to the next unique key. Specifying a negative value skips to the previous key.
Return Value
Type:
Usual
TRUE if successful; otherwise, FALSE.
Remarks
DBServer:OrderSkipUnique() allows you to make a non-unique order look like a unique order. Each time you use DBServer:OrderSkipUnique(), you are moved to the next (or previous) unique key, exactly as if you were skipping through a unique order. This method eliminates the problems associated with maintaining a unique order, while providing you with fast access to unique keys.
DBServer:OrderSkipUnique() sends a NotifyIntentToMove message before the operation.
It also sends a NotifyRecordChange message upon successful completion.
Examples
This examples uses DBServer:OrderSkipUnique() to build an array of unique last names beginning with the letter "J:"
1METHOD LastUnique() CLASS Customer
2LOCAL aLast[0] AS ARRAY
3SELF:SetIndex("last")
4? SELF:OrderIsUnique()
5
6SELF:OrderScope(0, "J")
7SELF:OrderScope(1, "J")
8SELF:GoTop()
9DO WHILE !SELF:EOF
10AADD(aLast, Last)
11SELF:OrderSkipUnique()
12ENDDO
13
14SELF:OrderScope(0, NIL)
15SELF:OrderScope(1, NIL)
16RETURN aLast
See Also