Gossamer Forum
Home : General : Perl Programming :

DBI connection "error"

Quote Reply
DBI connection "error"
  

HELP! When I try to connect to my database I am getting the following "error." (I used quotes for a reason) When I run my script from a command prompt, it connects to the database and returns all rows exactly as expected. When I run it from a web browser, though, I get the following error message:

Can't call method "prepare" on an undefined value at C:\cgi-bin\returnauction.cgi line 7.

This is my DBI initialization:
$database = DBI->connect ("DBI:ODBC:AuctionData",{PrintError => 1, RaiseError => 1});


I don't understand how the connection to my database can be OK when run from a prompt, but be undefined when run from a browser. Any help is very much appreciated as I think that Google is getting tired of spitting out worthless results to my requests. Thanks.

--Seth

Subject Author Views Date
Thread DBI connection "error" seth_h 4431 Dec 19, 2003, 1:21 PM
Post Re: [seth_h] DBI connection "error"
Andy 4300 Dec 20, 2003, 2:28 AM