F
francis.moore
Hi,
I'm no perl programmer, but I need to fix some perl code that was
serving some web pages correctly until recently. Since then the name
of a server has changed and we think that this is what is causing the
issue.
The error we get is:
Can't call method "prepare" on an undefined value at line 77...
Which is caused by these lines:
my $dbHandle = DBI->connect("dbi:Sybase:server=ODB;database=ABC",
'user', 'password', {PrintError => 1});
my $sqlStatement=$reports{$report}->{'query'};
my $stHandle = $dbHandle->prepare($sqlStatement);
We think it's because the value of the ODB variable (the db server)
has changed recently, but we can't find the definition of this
variable to check the current value or change it to the correct
servername.
Can anyone give me a hint as to where this variable is likely to be
defined?
It's not in this perl file and I've grepped all the nearby directories
but without any luck.
Or how to view it, i.e. using a print statement to a file
Many thanks,
Frank.
I'm no perl programmer, but I need to fix some perl code that was
serving some web pages correctly until recently. Since then the name
of a server has changed and we think that this is what is causing the
issue.
The error we get is:
Can't call method "prepare" on an undefined value at line 77...
Which is caused by these lines:
my $dbHandle = DBI->connect("dbi:Sybase:server=ODB;database=ABC",
'user', 'password', {PrintError => 1});
my $sqlStatement=$reports{$report}->{'query'};
my $stHandle = $dbHandle->prepare($sqlStatement);
We think it's because the value of the ODB variable (the db server)
has changed recently, but we can't find the definition of this
variable to check the current value or change it to the correct
servername.
Can anyone give me a hint as to where this variable is likely to be
defined?
It's not in this perl file and I've grepped all the nearby directories
but without any luck.
Or how to view it, i.e. using a print statement to a file
Many thanks,
Frank.