The only reason why that might happen (assuming it is working somewhere else),
the object isn't return. So connect() constructor couldn't return the object.

To read the error message from DBI, you'll have to read $DBI::errstr:

my $dbh = DBI->connect(dsn, login, password) or die $DBI::errstr;


If the program passes the above line without errors, you'll not have that error
message. 

another way of doing the above is:

my $dbh = DBI->connect(dsn, login, password, {RaiseError=>});







Sent on Jul 4 by Dawn H to [EMAIL PROTECTED]

dpengu> The error log says,
dpengu> 
dpengu> Can't call method "do: on an undefined value. . .
dpengu> 
dpengu> But the EXACT SAME code works on another script I'm running. I don't see any
dpengu> reason for it to suddenly have a problem. What does this error message MEAN?
dpengu> 
dpengu> ----Code Snippet------
dpengu>         # Form was okay; get image type and contents and create new record.
dpengu>         # Use REPLACE to clobber any old image with the same name.
dpengu> 
dpengu>         $mime_type = uploadInfo ($image)->{'Content-Type'};
dpengu>         ($full, $thumb) = read_image_file ($image);
dpengu>         $dbh->do ("REPLACE INTO image
dpengu>                         (name,listing_id,image,thumbnail,mime_type)
dpengu>                         VALUES(?,?,?,?,?)",
dpengu>                                 undef,
dpengu>                                 $name, $listing_id, $full, $thumb, $mime_type)
dpengu>                 or bail_out("There's a problem with the upload");
dpengu> -----End Snippet-------
dpengu> 
dpengu> http://www.rdcss.com/ - R&D Computer Solutions
dpengu> http://wow.cooncheese.com/ - WOW.CoonCheese.com
dpengu> http://dpenguin.rdcss.com/ - Cornucopia
dpengu>  Filter fixer: database,sql,query
dpengu> 
dpengu> 
dpengu> ---------------------------------------------------------------------
dpengu> Before posting, please check:
dpengu>    http://www.mysql.com/manual.php   (the manual)
dpengu>    http://lists.mysql.com/           (the list archive)
dpengu> 
dpengu> To request this thread, e-mail <[EMAIL PROTECTED]>
dpengu> To unsubscribe, e-mail 
<[EMAIL PROTECTED]>
dpengu> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
dpengu> 

-- 

Sherzod Ruzmetov 
[EMAIL PROTECTED]
http://www.ultracgis.com/sherzodR




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to