Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

ZOOM error 235 help

by Foxpond Hollow (Sexton)
on Aug 25, 2009 at 03:38 UTC ( #790967=perlquestion: print w/replies, xml ) Need Help??

Foxpond Hollow has asked for the wisdom of the Perl Monks concerning the following question:

Hi, after posting about resources for obscure modules, it seemed like the overwhelming suggestion was to post at none other than Perl Monks! So here's my specific issue. I am trying to learn how to use the ZOOM module to interface with a z3950 server, specifically California Digital Library's Melvyl database. So far I have just been tinkering with the module to test out some functionality. I can manage to connect to Melvyl fine, but when I try to run a search on it, it gives me error 235, "Database not found," which doesn't make sense because I've just connected to it. At this point I've basically just copy/pasted code form the documentation examples and inserted the Melvyl address. Here's what I've got:
#!usr/bin/perl use strict; use ZOOM; use MARC::Record; # establish connection to CDL Melvyl database my $connection = new ZOOM::Connection("", 210); # print out the name of the server/database print "server is '", $connection->option("serverImplementationName"), +"'\n\n"; # run a search for books with "otters" in the title my $resultSet = $connection->search_pqf('@attr 1=4 otters'); # print out the number of results found print "Found ", $resultSet->size(), "records\n\n";
As part of debugging, I tried one of the other search formats, with the code:
my $resultSet = $connection->search(new ZOOM::Query::CQL('title=otters +'));
This search format ends up giving me error 10004, connection lost. Anyone know why it's able to connect and then suddenly thinks the server doesn't even exist, or if it does, it needs to drop the connection? I'm at a loss here as to what's going on, since I've been following the example code pretty clearly. I spoke to a guy at CDL who gave me the server info I'd need for the connection, so presumably I'm connecting right. Anyway any help would be appreciated.

Replies are listed 'Best First'.
Re: ZOOM error 235 help
by dave_the_m (Monsignor) on Aug 25, 2009 at 09:31 UTC
    It's a long time since I've done anything Z3950 related, but since each server holds one or more databases, you probably need to specify the database name as part of the connection; indeed the currrent zoom docs say:
    $conn = new ZOOM::Connection($host, $port, databaseName => "mydb");


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://790967]
Approved by GrandFather
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2022-05-20 16:32 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (75 votes). Check out past polls.