RE: MySQL with perl error

2001-07-04 Thread Sherzod Ruzmetov



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/ - RD 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:
dpenguhttp://www.mysql.com/manual.php   (the manual)
dpenguhttp://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




Re: MySQL with perl error

2001-07-04 Thread Michael Ott

hallo!

With reference to Dawn H on 04.07 00:36:
 The error log says,
 
 Can't call method do: on an undefined value. . .
 
 But the EXACT SAME code works on another script I'm running. I don't see any
 reason for it to suddenly have a problem. What does this error message MEAN?
 
 Code Snippet--
   # Form was okay; get image type and contents and create new record.
   # Use REPLACE to clobber any old image with the same name.
 
   $mime_type = uploadInfo ($image)-{'Content-Type'};
   ($full, $thumb) = read_image_file ($image);
   $dbh-do (REPLACE INTO image
   (name,listing_id,image,thumbnail,mime_type)
   VALUES(?,?,?,?,?),
   undef,
   $name, $listing_id, $full, $thumb, $mime_type)
   or bail_out(There's a problem with the upload);

i have it with (). like ($name), ($listing_id), ...

 -End Snippet---
 
 http://www.rdcss.com/ - RD Computer Solutions
 http://wow.cooncheese.com/ - WOW.CoonCheese.com
 http://dpenguin.rdcss.com/ - Cornucopia
  Filter fixer: database,sql,query
 
 
 -
 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

-- 
Gruß  bye

Michael Ott

-
- Siemens AG - IS IT PS 51 ERL -
- Werner-von-Siemens-Strasse 60 -
- 91050 Erlangen-
- Tel. +49 91 31 7 42 0 54  -
- [EMAIL PROTECTED]   -
-

open-source and you have much fun

-
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




RE: MySQL with perl error

2001-07-03 Thread Dawn H

The error log says,

Can't call method do: on an undefined value. . .

But the EXACT SAME code works on another script I'm running. I don't see any
reason for it to suddenly have a problem. What does this error message MEAN?

Code Snippet--
# Form was okay; get image type and contents and create new record.
# Use REPLACE to clobber any old image with the same name.

$mime_type = uploadInfo ($image)-{'Content-Type'};
($full, $thumb) = read_image_file ($image);
$dbh-do (REPLACE INTO image
(name,listing_id,image,thumbnail,mime_type)
VALUES(?,?,?,?,?),
undef,
$name, $listing_id, $full, $thumb, $mime_type)
or bail_out(There's a problem with the upload);
-End Snippet---

http://www.rdcss.com/ - RD Computer Solutions
http://wow.cooncheese.com/ - WOW.CoonCheese.com
http://dpenguin.rdcss.com/ - Cornucopia
 Filter fixer: database,sql,query


-
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