MySQL problem(2) ...
Jan Schenkel
janschenkel at yahoo.com
Tue Aug 22 14:10:33 EDT 2006
--- Jean-Pierre Soto <jean-pierre.soto at wanadoo.fr>
wrote:
> Sorry ... I have too big finger ...
>
> I have another problem ...
>
> I can access to any data in the database but when I
> want to see
> complete record one by one, I have just
> FIRST,PREVIOUS,NEXT and LAST
> with built-in manager...
>
> How can I jump to record 100 in one step, see it,
> and go to the next
> record etc...
>
> Thanks ...
>
Hi Jean-Pierre,
If you're using the Automated queries and database
linked controls, you can use the undocumented command
'revGoToRecordOfQuery'.
If your query is named 'foobar' then use:
##
on mouseUp
revGoToRecordOfQuery "foobar",100
end mouseUp
##
This will automatically update all the controls linked
to that query.
If you're using revdb library calls , you'll just have
to iterate over the revdb cursor with 'revdb_movenext'
until you get there:
##
on mouseUp
global gCursorID
local tCurrentRec
-- determine where we are in the cursor
put revdb_currentrecord(gCursorID) into tCurrentRec
if tCurrentRec < 100 then
repeat 100 - tCurrentRec times
get revdb_movenext(gCursorID)
end repeat
else
repeat tCurrentRec - 100 times
get revdb_moveprev(gCursorID)
end repeat
end if
-- now that we're at the right record, do something
-- ...
end mouseUp
##
Hope this helped,
Jan Schenkel.
Quartam Reports for Revolution
<http://www.quartam.com>
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the use-livecode
mailing list