Thanks Curt,
[110] mrna:/usr/local/perl5.005/lib/site_perl/DBD>
perl -MDBI -MDBD::Sybase -le 'print "$DBI::VERSION $DBD::Sybase::VERSION"'
1.14 0.91
My problem has mutated a bit. I'm not getting the uninitialized anymore and
so I can't trace down what the issue is anymore. Every, now and again it
happens to me though and I'm trying to clear up the fallacy in my
understanding of why it happens. So, if I see it again in some other code
I'll post. Thanks, everyone, for your help.
> -----Original Message-----
> From: Curt Russell Crandall [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 29, 2001 3:31 PM
> To: Tim Harsch
> Cc: [EMAIL PROTECTED]
> Subject: Re: -w does not allow undef for NULLs
>
>
> You will get this if you use the older DBD::Sybase. I struggled with this
> stuff and made ugly workarounds just get stuff undef through a placeholder
> with DBD::Sybase 0.21. Either switch to 0.91 or check for an undef value
> and do a $dbh->quote() on it... unfortunately, you won't be able to use
> placeholders and you'll be stuck using a stored procedure to do a lousy
> insert. I HIGHLY recommend you use the latest DBD::Sybase module and at
> least DBI 1.14.
>
> HTH,
> Curt Crandall
>
> On Thu, 28 Jun 2001, Tim Harsch wrote:
>
> > how do you use undef when you mean to without -w barking this at you:
> > Use of uninitialized value at
> > /usr/local/perl5.005/lib/site_perl/DBD/Sybase.pm line 121.
> >
> > code snip:
> > $hDB->do( <<SQL );
> > create table #temp_for_this_session
> > ( fld1 int not null,
> > fld2 varchar(20) null )
> > SQL
> >
> > my @myvalues = (
> > [ 5, undef ],
> > );
> >
> > foreach my $myvalue ( @myvalues ) {
> > my $sql = 'insert into #temp values ( ?, ? )';
> > $hDB->do( $sql, {}, @$myvalue );
> > } # end foreach
> >
> > __END__
> >
> > I'm supposed to use undef to indicate NULL in the database
> right? Should
> > Sybase.pm be checking for undef before trying to use the value?
> >
> >
>
>