Forgot the script sample:
my $sql="SELECT EMPLOYEE_ID,DepartureDate FROM employee WHERE
departuredate>=$today";
print "$sql\n";
$data->Run($sql);
#$data->DumpData;
while($data->FetchRow())
{
my (@columns)=$db->GetData($field);
my $field, %data;
foreach $field(@columns)
{
$data{$field}=$data->GetData($field);
print $data{$field}."\n";
}
}
-----Original Message-----
From: Morehouse, Ken [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 04, 2000 9:26 AM
To: Win32 Perl Admin ActiveState LS (E-mail); Win32 Perl DB ActiveState
LS (E-mail)
Subject: Strange Errors on Win32::ODBC
Why does this script fail when I comment out the DumpData line?
I get the following error:
Can't call method "GetData" on an undefined value at E:\perl
scripts\departwatch
.pl line 16.
But, I get the following when I have the DumpData uncommented.:
SELECT EMPLOYEE_ID,DepartureDate FROM employee WHERE
departuredate>='11/5/2000'
Dumping Data for connection: 1
Error: ""
EMPLOYEE_ID DepartureDate
----------- -------------
67 2000-11-05 00:00:00
177 2000-11-05 00:00:00
53 2000-11-05 00:00:00
955 2000-11-05 00:00:00
497 2000-11-05 00:00:00
462 2000-11-05 00:00:00
487 2000-11-05 00:00:00
918 2000-11-05 00:00:00
547 2000-11-05 00:00:00
874 2000-11-05 00:00:00
251 2000-11-05 00:00:00
341 2000-11-05 00:00:00
654 2000-11-05 00:00:00
662 2000-11-05 00:00:00
750 2000-11-05 00:00:00
840 2000-11-05 00:00:00
825 2000-11-05 00:00:00
827 2000-11-05 00:00:00
1039 2000-11-05 00:00:00
859 2000-11-05 00:00:00
1020 2000-11-05 00:00:00
911 2000-11-05 00:00:00
1022 2000-11-05 00:00:00
1023 2000-11-05 00:00:00
1029 2000-11-05 00:00:00
1040 2000-11-05 00:00:00
1048 2000-11-05 00:00:00
1069 2000-11-05 00:00:00
Ken Morehouse II, MCSE
Telergy
IT Operations
Sr NT Administrator
[EMAIL PROTECTED]
http://www.telergy.net
_______________________________________________
Perl-Win32-Database mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-database
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin