Link to home
Start Free TrialLog in
Avatar of satmetrix_it
satmetrix_it

asked on

Perl script error: Can't locate object method "getError"

I have two servers running a script. one server works fine and the other gets an error. The perl directories on both servers are identical.

here is the error:
Can't locate object method "getError" via package "Sms::DbUtils" at utilities.pl
 line 286.

here is that part of teh code:
sub retrieveConfiguration_new
{
      my ($db,$t_config,$system_id,$configName,$logFileName) = @_;
      my ($data_type, $value1, $value2);
      my $sql = "SELECT data_type, value1, value2 FROM $t_config WHERE system_id = '$system_id' AND name = '$configName' AND enabled = '1'";      
      my %row = $db->getRow($sql);
      $dbError = $db->getError();                <-- this is line 286
      if ($dbError!~/^\s*$/)
      {
            &trace($logFileName,$sql);
            &trace($logFileName,$dbError);
            exit(1);
ASKER CERTIFIED SOLUTION
Avatar of satmetrix_it
satmetrix_it

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of satmetrix_it
satmetrix_it

ASKER

This was teh fix.