We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

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

Medium Priority
466 Views
Last Modified: 2012-06-21
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);
Comment
Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
This was teh fix.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.