Win32::OCBC problem
From: Regent (arthur0421_at_163.com)
Date: 12/31/03
- Next message: Truthless: "File handle Variable scope issue"
- Previous message: Matt Garrish: "Re: len"
- Next in thread: Matt Garrish: "Re: Win32::OCBC problem"
- Reply: Matt Garrish: "Re: Win32::OCBC problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Dec 2003 08:17:57 +0800
Hi, friends
I'm getting lots of "Use of uninitialized value in array element at C:/Perl/lib/Win32/ODBC.pm line 256."
It seems that each matching row in the database returns this line.
Here's how I typically use Win32::ODBC
#!C:/Perl/bin/Perl -wT
use strict;
# <snip>
my $myDb= new Win32::ODBC("$DSN");
if (! $myDb)
{
print STDERR "error connecting to $DSN";
Win32::ODBC::DumpError();
die;
}
else
{
$myDb->Sql("SELECT * FROM courses WHERE coursename = '$query'");
my (@fields) = $myDb->FieldNames();
while ($myDb->FetchRow())
{
my (%values) = $myDb->DataHash();
print $values{'coursename'};
}
$myDb->Close();
}
Thanks for any help!
Regent
arthur0421@163.com
- Next message: Truthless: "File handle Variable scope issue"
- Previous message: Matt Garrish: "Re: len"
- Next in thread: Matt Garrish: "Re: Win32::OCBC problem"
- Reply: Matt Garrish: "Re: Win32::OCBC problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|