Win32::OCBC problem

From: Regent (arthur0421_at_163.com)
Date: 12/31/03


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



Relevant Pages

  • Win32::ODBC problem
    ... It seems that each matching row in the database returns this line. ... use strict; ...
    (comp.lang.perl.modules)
  • Re: T-SQL CLOSE Connection to DB
    ... The 'MyDb' is still under the status RUNNABLE for the command 'SELECT ... INTO' under the ProgamName 'Microsoft SQL Server Management Studio - ... Management Studio uses the ALTER DATABASE command I ... paste the contents of the clipboard in a query window or in a ...
    (comp.databases.ms-sqlserver)
  • RE: SqlExpress & C# problem in an ASP.NET web site
    ... ALTER DATABASE [MyDB] SET ANSI_NULLS OFF ... ALTER DATABASE SET ANSI_PADDING OFF ... > public static SqlConnection GetConnection(string filename) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Parameterized query problem
    ... Starting from one server where I could connect to the database but not see ... any error info to another where I could see the error info but not connect ... I cannot pass my array to the execute statement I need to use the array ... Make sure mydb is in the results. ...
    (microsoft.public.inetserver.asp.db)
  • Re: pattern matching
    ... use strict; ... use warnings; ... afkomstige benaming voor een planetoïde die ...
    (comp.lang.perl.misc)