05-23-2007
Can't locate object method "fetchrow_array" Error
Hi,
I have a perl script which is interacting with Database.
I have following line of code :
=================================================
sub BEGIN
{
#use Getopt::Std;
#getopt ('S');
#($STEAP)=($opt_S);
use lib ("/home/perl_lib");
use NewSybDBLib;
use Sybase::DBlib;
use IniFileUtil;
use ErrMsgUtil;
use strict;
}
sub main();
main();
print "\nMESSAGE:\n";
$dbh->SetSQLCmd("select * from test ");
@result=$dbh->ExecSQL();
if($dbh->{message_text}) {
print "DB MESSAGE\n";
print $dbh->{message_text} . "\n";
$dbh->{message_text}="";
}
if($dbh->{error_text}) {
$db_error_text=$dbh->{error_text};
$dbh->Delete;
die "ERROR: \n" . $db_error_text . "\n";
}
while (@result = $dbh->fetchrow_array()) {
my $tablename = $result[1];
my $firstrun = $result[2];
my $firstsuccess = $result[3];
print " $tablename $firstrun $firstsuccess \n";
}
The SQL command is getting records from table test .
If i omit my while loop at the end which is using fetchrow_array then script is running perfectly but when i tried to get the records one by one using fetch_row_array() i got the Error :
Can't locate object method "fetchrow_array" via package "NewSybDBLib"
I use the package use Sybase::DBlib but it is not working.
Any idea what might be the solution.
rawat
Last edited by vino; 05-23-2007 at 09:01 AM..
Reason: Disabled smilies
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I was able to solve my previous problem (link directory)... but now i have this following problem.
I have mounted a disk from other machine using "mount -F nfs" command. When i run a batch which generates some files in that drive.... after a certain number of files i get... (1 Reply)
Discussion started by: nileshkarania
1 Replies
2. Programming
Hi,
We are trying to run dbx on a core file for which we have the original executable and libs, but not the source / object tree. We have recompiled the objects from the original source, but dbx complains that they were compiled at a different time, and refuses to read them:
Object file:... (0 Replies)
Discussion started by: Sabari Nath S
0 Replies
3. Programming
Didn't have this problem in AIX, but ported to Linux with GCC compiler and am now getting a runtime error:
tssutil: symbol lookup error: /work/agility/devel/bin/libagam.so: undefined symbol: fstat
I'm sure most of you know that fstat is an intrinsic function just like printf, memcpy, etc. When I... (5 Replies)
Discussion started by: marcus121
5 Replies
4. Programming
Hi,
i am working in C in Fedora Eclipse 3.3.0 with gdb debugger. I am geting segmentation fault with an error message "mi_cmd_var_create: unable to create variable object" on debugging the program.
What should I do to solve this problem?
rgds,
Dona_m (14 Replies)
Discussion started by: dona_m
14 Replies
5. Solaris
At times I have unknown applications that hang for long periods of time over and over again after a network glitch. These are sometimes nfs4 but usually nfs3 clients and are always solaris10 systems.
nfs: NFS server hostname not responding still trying
nfs: NFS server hostname ok
nfs: NFS... (1 Reply)
Discussion started by: HPAVC
1 Replies
6. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
7. Solaris
After a memory upgrade all network interfaces are misconfigued. How do i resolve this issue. Below are some out puts.thanks.
ifconfig: plumb: SIOCLIFADDIF: eg000g0:2: no such interface
# ifconfig eg1000g0:2 plumb
ifconfig: plumb: SIOCLIFADDIF: eg1000g0:2: no such interface
# ifconfig... (2 Replies)
Discussion started by: andersonedouard
2 Replies
8. Emergency UNIX and Linux Support
Hi,
I am running a perl script to automate a process and I keep running into a error can't find the "value"
Can't call method "value" on an undefined value at process_file.pl line 44.
file is CVS
cell is ifdfdxrfmp.ksh
Here is the script I have also attached it as well:
... (2 Replies)
Discussion started by: vpundit
2 Replies
9. OS X (Apple)
OS-X 10.8.4
Using locate I get these results:
10:~ mize$ locate /Users/mize/*.sh
/Users/mize/Zend/workspaces/DefaultWorkspace/SLM/vendor/ZF2/bin/check-cs.sh
/Users/mize/copy_ascii_upload.sh
/Users/mize/copy_ascii_upload_to_server.sh
/Users/mize/copy_form_functions_php_to_jpl.sh... (7 Replies)
Discussion started by: Gary Mize
7 Replies
LEARN ABOUT DEBIAN
dbix::profile
Profile(3) User Contributed Perl Documentation Profile(3)
NAME
DBIx::Profile - DBI query profiler
Version 1.0
Copyright (c) 1999,2000 Jeff Lathan, Kerry Clendinning.
All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SYNOPSIS
use DBIx::Profile; or "perl -MDBIx::Profile <program>"
use DBI;
$dbh->printProfile();
DESCRIPTION
DBIx::Profile is a quick and easy, and mostly transparent, profiler
for scripts using DBI. It collects information on the query
level, and keeps track of first, failed, normal, and total amounts
(count, wall clock, CPU time) for each function on the query.
NOTE: DBIx::Profile use Time::HiRes to clock the wall time and
the old standby times() to clock the CPU time. The CPU time is
pretty coarse.
DBIx::Profile can also trace the execution of queries. It will print
a timestamp and the query that was called. This is optional, and
occurs only when the environment variable DBIXPROFILETRACE is set
to 1. (ex: (bash) export DBIXPROFILETRACE=1).
Not all DBI methods are profiled at this time.
Except for replacing the existing "use" and "connect" statements,
DBIx::Profile allows DBI functions to be called as usual on handles.
Prints information to STDERR, prefaced with the pid.
RECIPE
1) Add "use DBIx::Profile" or execute "perl -MDBIx::Profile <program>"
2) Optional: add $dbh->printProfile (will execute during
disconnect otherwise)
3) Run code
4) Data output will happen at printProfile or $dbh->disconnect;
METHODS
printProfile
$dbh->printProfile();
Will print out the data collected.
If this is not called before disconnect, disconnect will call
printProfile.
setLogFile
$dbh->setLogFile("ProfileOutput.txt");
Will save all output to the file.
AUTHORS
Jeff Lathan, lathan@pobox.com
Kerry Clendinning, kerry@deja.com
Aaron Lee, aaron@pointx.org
Michael G Schwern, schwern@pobox.com
SEE ALSO
L<perl(1)>, L<DBI>
perl v5.8.0 2001-12-17 Profile(3)