Position in a Cursor (MM Director)
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Apr 7 11:58:08 CDT 2003
on 4/7/03 11:02 AM, Mark Maslowski at mark at majico.com wrote:
Hi Mark,
> It's been a while since I worked with Valentina so forgive me if this is a
> lack of brainpower on my part...
>
> I am working on a product catalog CD in Director with data coming out of a
> vdb. When a user selects a product using a drop down menu, I create a Cursor
> with that product number (SELECT * from Data WHERE Product = 'Tee Shirt')
> and display the proper information. No problem. The client also wants the
> ability to use a next and back button to navigate through all the products.
> I create a Cursor with all the products (SELECT * from Data) and use the
> next record and previous record from the beginning of the db. Also no
> problem.
>
> However, what should really happen is when a user selects a specific
> product, the next and back buttons should allow them to go to the adjacent
> products, not start all over from the beginning of the database.
> Unfortunately, I cannot think of how to interact the two cursors. What I
> need to find is the position of the chosen product within the cursor of all
> products. Basically, I need the ability to search within an existing cursor.
Does all_cursor keep records in some sorted order?
If yes, then you can use binary search to do fast find of needed record.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list