[thelist] Need some perls of wisdom on dbmopen

Norman Bunn norman.bunn at craftedsolutions.com
Sat Jan 7 13:33:07 CST 2006


I have a 6 year old perl program that has suddenly quit working.  My 
host is investigating what changed, but I suspect a system upgrade has 
made some of my code obsolete.  I am using dbmopen to open a database, 
but the command is getting an error.  The impacted codelooks like this:

$agentFile = $base.$dir."db.agent";
dbmopen(%agentBase, $agentFile, 0666) || &error_handling($!, "dbmopen on 
$agentFile", "Agent");

and the error handling routine looks like this:

($errorCode, $function, $program) = @_;
<snip>
    $message = "Program: $program generated Error Code: $errorCode - on 
$Day[$day], $month/$date/$year, at $hour:$minute:$second while 
attempting $function.";

which generates:

Program: Agent generated Error Code: Invalid argument - on Saturday, 
1/7/06, at 11:39:53 while attempting dbmopen on 
/www/tlcrealtyinc/tlc/data/db.agent.

The file is not named "db.agent".  It is called "db.agent.db", because 
previously the dbmopen command automatically appended the ".db".  I 
thought I could fix this with a simple name change.  However, when I do 
that, the error goes away, but there is no data displayed.  A simple 
review of the contents of the datafile show the data.

Any ideas or leads on where to go to ask?

Norman

-- 
---

Norman W. Bunn
norman.bunn at craftedsolutions.com
803.405.1008
----------------------------------------------
www.CraftedSolutions.com
Crafted Solutions, Inc.
Web Design & Development
Web Site Hosting & Custom Solutions
"Get the results the Internet promises;
 get the 'Net Result' from Crafted Solutions!"
----------------------------------------------




More information about the thelist mailing list