There is something in your DOS Environment that is not a part of your web
server environment. Probably ORACLE_HOME needs to be set or something.
Also, check your web server logs.
> -----Original Message-----
> From: Mark Zimmerman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 4:30 PM
> To: [EMAIL PROTECTED]
> Subject: DBI:Oracle Oracle8 IIS problem at prepare
>
>
> my system:
> dual 933, 256 ram, 108gigs hd, win2k pro, IIS 5.0, ActivePerl 5.6.0,
> latest DBI, latest DBD-Oracle
> my problem:
> my script works in dos, but in IE 5.0 and NS 3.04 it dies at
> the prepare
> statement (my $sth = $dbh->prepare($query))
>
> I have tried everything I can think of.
> If I change the DBD driver to ODBC it works, but I would rather use
> DBI/Native Oracle drivers.
> Since it gets past the ->connect statement, it is connecting to the Oracle
> db.
> Why is the ->prepare statement causing it to drop?
> Is there another method of sending the query to the db that I can try?
>
> Example of my script:
>
> use DBI;
>
> print "Content-type: text/html\n\n";
>
>
> my $dbh = DBI->connect('DBI:Oracle:prd.world','username','password',
> RaiseError => 1 } )
> or die "Couldn't connect to database: " . DBI->errstr;
>
> $query='SELECT * FROM oracle_table WHERE last_name = ?';
>
> print "This prints fine!";
>
> my $sth = $dbh->prepare($query)
> or die "Couldn't prepare statement: " . $dbh->errstr;
>
> print "This prints in dos, but not to a web browser!";
>
> $lastname= "Lastname";
> my @data;
> chomp $lastname;
> $sth->execute($lastname)
> or die "Couldn't execute statement: " . $sth->errstr;
>
> while (@data = $sth->fetchrow_array())
> {
> my $id = $data[1];
> my $firstname = $data[2];
> print "\t$id: $firstname $lastname\n";
> }
>
> $dbh->disconnect;
> ____________________________________
>
>
>