locate methods for cursor
Florian Bogeschdorfer
fb at memedia.de
Wed Jun 21 12:56:47 CDT 2006
>
> > Hi!
> > I select data into cursor. In the data selected I've got some primary
> key.
>
> > Using that key I want to be able to locate to the record in the cursor
> > that has the value specified as a key. For example, my key field is
> > "TEST_ID". I want to move to a record that has a value 3 of field
> > "TEST_ID" and to delete or udate that record. How can I do it? Thanx.
>
> As in any SQL database:
>
> DELETE ...... WHERE TEST_ID = 3
>
> UPDATE ...... WHERE TEST_ID = 3
>
>
> --
> Best regards,
Hi Ruslan!
I remember missing this feature in V1 already.
Since the SQL approach would not update the cursor data, it would be
necessary to build a new cursor. But the cursor may be impossible to
rebuild, since it might come from a different part of the program and belong
to queries that no longer exist. Or the cursor might already have been
changed (records dropped e.g.) and a repeated query would be quite an effort
(need to log all drops on the previous cursor).
In such a case I always had to make a repeat loop to step through the cursor
and find a specific record with this value...no need to talk about the
negatives in here.
Why not build it as a feature?
jumpToValueInCursor(cursor,fieldname,value)
I would love that
Best
Florian
More information about the Valentina
mailing list