Cursor.FindSingleValue
Thomas Flemming
tf at ttqv.com
Mon Dec 28 12:13:16 CST 2009
........
this was almost my whole day now, trying to find out, why some cursor.findxxx
are returning funny results !
> I think we need add check of this, and throw error in case as yours ...
Yes, please!
But much more:
How do I search in a cursor?
Regards,
Tom
Ruslan Zasukhin schrieb:
> On 12/28/09 4:36 PM, "Thomas Flemming" <tf at ttqv.com> wrote:
>
> Hi Thomas,
>
>> I'm trying to get the cursor-position of a specific record with vnet.
>>
>>
>> CursorPosition = mCursor.Field("name").FindSingleValue(name1)
>> But this always returns the RecID
>
> Wow, :)
>
> I never did know that somebody can try this in such way :)
> Yep, API of classes sounds like this is possible.
>
> In fact VField.FindXXXX() methods can be used only for fields of a VTABLE,
> But not of VCURSOR.
>
> I think we need add check of this, and throw error in case as yours ...
>
>> When I do it like this, it works, but of course slow on large cursors:
>>
>> For i As Integer = 1 To mCursor.RecordCount
>> mCursor.Position = i
>> If mCursor.Field("name").Value = name1 Then Return mCursor.Position
>> Next
>>
>> Where am I wrong ?
>> How do I get the cursor.position of a specific record fast ;-)
>
--
/****************************************
** Dipl.-Ing. Thomas Flemming
** Software Development
**
** Touratech AG
** Auf dem Zimmermann 7-9
** D-78078 Niedereschach
**
** mail tf at ttqv.com
** fon +49 (0) 7728 9279-206
** fax +49 (0) 7728 9279-29
**
** http://www.ttqv.com
** http://www.touratech.de
**
** ... und immer dem Pfeil nach!
***************************************/
More information about the Valentina
mailing list