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
dbd::firebird::tableinfo::basic
DBD::Firebird::TableInfo::Basic(3pm) User Contributed Perl Documentation DBD::Firebird::TableInfo::Basic(3pm)
NAME
DBD::Firebird::TableInfo::Basic - A base class for lowest-common denominator Interbase table_info() querying.
SYNOPSIS
# Add support for a hypothetical IB derivative
package DBD::Firebird::TableInfo::HypotheticalIBDerivative
@ISA = qw(DBD::Firebird::TableInfo::Basic);
# What table types are supported?
sub supported_types {
('SYSTEM TABLE', 'TABLE', 'VIEW', 'SPECIAL TABLE TYPE');
}
sub table_info {
my ($self, $dbh, $table, @types) = @_;
}
INTERFACE
list_catalogs
$ti->list_catalogs($dbh); # $dbh->table_info('%', '', '')
Returns a statement handle with an empty result set, as IB does not support the DBI concept of catalogs. (Rule 19a)
list_schema
$ti->list_schema($dbh); # $dbh->table_info('', '%', '')
Returns a statement handle with an empty result set, as IB does not support the DBI concept of schema. (Rule 19b)
list_tables
$ti->list_tables($dbh, $table, @types); # $dbh->table_info('', '',
# 'FOO%',
# 'TABLE,VIEW');
Called in response to $dbh->table_info($cat, $schem, $table, $types). $cat and $schem are presently ignored.
This is the workhorse method that must return an appropriate statement handle of tables given the requested $table pattern and @types.
A blank $table pattern means "any table," and an empty @types list means "any type."
@types is a list of user-supplied, requested types. "DBD::Firebird::db::table_info" will normalize the user-supplied types, stripping
quote marks, uppercasing, and removing duplicates.
list_types
$tbl_info->list_types($dbh); # $dbh->table_info('', '', '', '%')
Called in response to $dbh->table_info('', '', '', '%'), returning a statement handle with a TABLE_TYPE column populated with the
results of supported_types. (Rule 19c)
Normally not overridden. Override supported_types, instead.
supported_types
$tbl_info->supported_types($dbh);
Returns a list of supported DBI TABLE_TYPE entries. The default implementation supports 'TABLE', 'SYSTEM TABLE' and 'VIEW'.
This method is called by the default implementation of "list_types".
perl v5.14.2 2011-08-30 DBD::Firebird::TableInfo::Basic(3pm)