Hi,
I'm using ZOOM to access the Library of Congress. I can
connect and
get hits, but when I try to retrieve the first record I get
the error
"Failed to retrieve record #1" (can't get any
other record, either).
Here's an example of some trial code:
/*********************/
int main( void )
{
ZOOM_connection z;
ZOOM_resultset r;
int error;
const char *errmsg, *addinfo;
z = ZOOM_connection_new
("z3950.loc.gov:7090/voyager", 0);
if ((error = ZOOM_connection_error(z, &errmsg,
&addinfo)))
{
fprintf (stderr, "Error: %s (%d) %sn",
errmsg, error, addinfo);
exit (2);
}
r = ZOOM_connection_search_pqf (z, "knuth");
if ((error = ZOOM_connection_error(z, &errmsg,
&addinfo)))
fprintf (stderr, "Error: %s (%d) %sn",
errmsg, error, addinfo);
else
printf ("Result count: %ldn", (long)
ZOOM_resultset_size(r));
int len;
ZOOM_record rec = ZOOM_resultset_record( r, 0 );
const char * recText = ZOOM_record_get( rec,
"render", &len );
/* if rec is non-null, we got a record for display */
if (recText)
{
fwrite (recText, 1, len, stdout); printf
("n");
}
ZOOM_resultset_destroy (r);
ZOOM_connection_destroy (z);
return 0;
}
/*********************/
Outut:
Result count: 203
Failed to retrieve record #1
ZoomTest2 has exited with status 0.
Any ideas?
Thanks,
Jon
_______________________________________________
Yazlist mailing list
Yazlist lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list
|