It depends on the error. You didn't indicate if the perl compiler complained (e.g., missing module) or if DBI->connect failed. I presume the latter, in which case the value of $DBI::errstr might help.
________________________________ From: [EMAIL PROTECTED] on behalf of Chris Marshall Sent: Wed 12/20/2006 7:40 AM To: [email protected] Subject: RE: DBI Oracle Windows 2003 Eric, The DBI module is installed where ever the PPM downloaded and extracted them to, I am guessing under C:\perl\ My script looks like this.... use strict; use DBI; my $dbh = DBI->connect( 'dbi:Oracle:S89QERY', 'username1, 'password1', { RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made: $DBI::errstr"; my $sql = qq{ SELECT DISTINCT A.LAST_NAME, A.FIRST_NAME, A.MIDDLE_NAME FROM PS_NAMES A WHERE A.EFFDT = (SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED WHERE A.EMPLID .....blah blah blah......}; my $sth = $dbh->prepare( $sql ); $sth->execute(); my( $lastname, $middlename, $firstname ); $sth->bind_columns( undef, \$lastname, \$middlename, \$firstname ); while( $sth->fetch() ) { print "$lastname, $middlename, $firstname\n"; } $sth->finish(); $dbh->disconnect(); Thank you, Chris At 08:30 AM 12/20/2006, you wrote: >It probably depends on how you're connecting to Oracle, and how the DBI >and DBD::Oracle modules are installed. >Where are those libraries installed, did you pass the DBD::Oracle test >suite, and what is your DBI->connect statement? > >Eric J. Roode > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Chris >Marshall >Sent: Wednesday, December 20, 2006 8:27 AM >To: [email protected] >Subject: DBI Oracle Windows 2003 > >Hello, > >I have a script that accesses an Oracle database via DBI. My script >will ONLY run properly from the Desktop folder on my Windows 2003 >Server. Anyone have any idea of how I can a Perl script on a Windows >2003 server using the DBI module to perform properly somewhere OTHER >than the C:\Documents and Settings\UserName\Desktop\ folder? > >Any suggestions would be greatly appreciated. > >Thank you, >Christopher Marshall >Information Technology Department >Danville Community College > > >_______________________________________________ >ActivePerl mailing list >[email protected] >To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs >_______________________________________________ >ActivePerl mailing list >[email protected] >To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
