Hello all,
I have been attempting to use DBI::ODBC on a windows 2000 machine running
IIS to connect to an Oracle database on a Unix machine. I have set up the
DSN for the ODBC connection and I can actually get a connection to the
database and retrieve data when I call cgi page from a command line.
However, when I call the cgi from an html page the call to the database just
hangs the web browser. If I take out the connection calls, the cgi page
loads correctly.
I feel that this is an error that is happening because of either security
reasons or because how IIS forks off the process when calling the database.
If some one could give me some advice on what might be happening and how to
fix it I would greatly appreciate it.
Here is my connection code:
(again, this code does work when I run script command line just not when
running as cgi)
use DBI;
my $dbh = DBI->connect("dbi:ODBC:<dsnname>", "username", "pswd");
my $sth = $dbh->prepare("Select * from table");
$sth->execute or die "Can't execute SELECT statement";
while (@row = $sth->fetchrow_array ) {
print "@row \n";
}
$sth->finish();
$dbh->disconnect();
TIA,
Bob Reuss