Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First time run only

Status
Not open for further replies.

Tve

Programmer
May 22, 2000
166
FR
Hi,

I am running the following code:


<%@ LANGUAGE = PerlScript%>
<%

use Config::IniFiles; # This is to get infile data
use File::Basename; # Return the name of the directory
use DBI; # Use the dbi driver

# Connect to the database
$dbh = DBI->connect(&quot;dbi:Oracle:pID1&quot;, &quot;pdms&quot;, &quot;pdms&quot;, {AutoCommit => 0,RaiseError => 1}) or die &quot;Connection failed to database $my_dbi: $DBI::errstr\n&quot;;

$Response->write(&quot;\$dbh value is: &quot; . $dbh);

# Create a new statement handle to fetch table information
@tables = $dbh->tables();

# DisConnect from the database
$dbh->disconnect or die &quot;Disconnection failed from destination database $DBI::errstr\n&quot;;


$test = &quot;ddd&quot;;

%>


This code runs fine the first time, but if I try to access the page again (or if I do a refresh), I get the following error:


$dbh value is: DBI::db=HASH(0x79be39c)
use Config::IniFiles; # This is to get infile data use File::Basename; # Return the name of the directory use DBI; # Use the dbi driver # Connect to the database $dbh = DBI->connect(&quot;dbi:Oracle:pID1&quot;, &quot;pdms&quot;, &quot;pdms&quot;, {AutoCommit => 0,RaiseError => 1}) or die &quot;Connection failed to database $my_dbi: $DBI::errstr\n&quot;; $Response->write(&quot;\$dbh value is: &quot; . $dbh); # Create a new statement handle to fetch table information @tables = $dbh->tables(); # DisConnect from the database $dbh->disconnect or die &quot;Disconnection failed from destination database $DBI::errstr\n&quot;; $test = &quot;ddd&quot;; error '80004005'

Internal Error

?


What could be the reason for this?

Regards,

Thierry
 
I have no exp with perl but I do know that if this is an access database, and it's in the webserver's realm of virtual directories, it puts a lock on the db after a first call. Try to locate the db somewhere else and run again...if that is the case.

smbure
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top