List Info

Thread: Using yaz_present to display subsets of results




Using yaz_present to display subsets of results
user name
2006-11-07 06:23:53
Sebastian Hammer wrote:
> Hi Mark,
> 
> The problem, I think, is in your for() loop through the
records; I think 
> it indicates a misunderstanding about how yaz_record()
works. Generally, 
> the record offset that you give to yaz_record() is the
offset into the 
> result set, not into any subset identified by
yaz_range(). This is 
> crucial: The yaz_range() function is strictly there to
help you write 
> more optimized client code; you do not need to call it.
> 
> In other words, if you want to display record numbers
10 to 20 from your 
> set, you loop from 10 to 20 and call yaz_record() for
each record. The 
> underlying code will retrieve records as necessary on
demand.
> 

Hi Sabastian,

OK, I've gotten it to work now simply by fixing my for()
loop as you 
explain. This is what John was saying as well -- the loop
calling 
yaz_record() shouldn't start at the first item in the subset
I 
mistakenly thought yaz_range() defined, it should start at
the desired 
offset in the entire result set.

Thanks very much,

Mark


-- 
Mark Jordan
Head of Library Systems
W.A.C. Bennett Library, Simon Fraser University
Burnaby, British Columbia, V5A 1S6, Canada
Phone (604) 291 5753 / Fax (604) 291 3023
mjordansfu.ca / http://www.sfu.ca/~mjorda
n/

_______________________________________________
Yazlist mailing list
Yazlistlists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )