DBI Oracle Windows 2003
am 20.12.2006 14:27:18 von Chris Marshall
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
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: DBI Oracle Windows 2003
am 20.12.2006 14:30:56 von eroode
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: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Chris
Marshall
Sent: Wednesday, December 20, 2006 8:27 AM
To: activeperl@listserv.ActiveState.com
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
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: DBI Oracle Windows 2003
am 20.12.2006 14:40:39 von Chris Marshall
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: activeperl-bounces@listserv.ActiveState.com
>[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Chris
>Marshall
>Sent: Wednesday, December 20, 2006 8:27 AM
>To: activeperl@listserv.ActiveState.com
>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
>ActivePerl@listserv.ActiveState.com
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>_______________________________________________
>ActivePerl mailing list
>ActivePerl@listserv.ActiveState.com
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: DBI Oracle Windows 2003
am 20.12.2006 15:33:28 von martin.thurn
What EXACTLY do you mean by "run from"? (Location of .pl file? cwd
of dos prompt?)
How EXACTLY are you invoking the program? (double-click? batch file?
dos prompt? scheduled task? what perl arguments?)
What EXACT steps have you taken to test "run from" another folder?
(copy .pl file? change cwd?)
What EXACT error message are you getting? (copy-paste, do not
paraphrase)
- - Martin
> >-----Original Message-----
> >From: activeperl-bounces@listserv.ActiveState.com
> >[mailto:activeperl-bounces@listserv.ActiveState.com] On
> Behalf Of Chris
> >Marshall
> >Sent: Wednesday, December 20, 2006 8:27 AM
> >To: activeperl@listserv.ActiveState.com
> >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.
> >
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: DBI Oracle Windows 2003
am 20.12.2006 15:37:15 von Jeff Holt
This is a multi-part message in MIME format.
--===============1466054369==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C72444.EBE6DC60"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C72444.EBE6DC60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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: activeperl-bounces@listserv.ActiveState.com on behalf of Chris =
Marshall
Sent: Wed 12/20/2006 7:40 AM
To: activeperl@listserv.ActiveState.com
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 =3D DBI->connect( 'dbi:Oracle:S89QERY',
'username1,
'password1',
{
RaiseError =3D> 1,
AutoCommit =3D> 0
}
) || die "Database connection not made: =
$DBI::errstr";
my $sql =3D qq{ SELECT DISTINCT A.LAST_NAME, A.FIRST_NAME, A.MIDDLE_NAME =
FROM
PS_NAMES A WHERE A.EFFDT =3D (SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED =
WHERE
A.EMPLID .....blah blah blah......};
my $sth =3D $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: activeperl-bounces@listserv.ActiveState.com
>[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Chris
>Marshall
>Sent: Wednesday, December 20, 2006 8:27 AM
>To: activeperl@listserv.ActiveState.com
>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
>ActivePerl@listserv.ActiveState.com
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>_______________________________________________
>ActivePerl mailing list
>ActivePerl@listserv.ActiveState.com
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
------_=_NextPart_001_01C72444.EBE6DC60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">=0A=
=0A=
=0A=
=0A=
=0A=
6.5.7638.1">=0A=
RE: DBI Oracle Windows 2003=0A=
=0A=
=0A=
=0A=
It depends on =
the error. You =0A=
didn't indicate if the perl compiler complained (e.g., missing module) =
or if =0A=
DBI->connect failed. I presume the latter, in which case =
t
face=3DArial color=3D#000000 size=3D2>he value of $DBI::errstr =
might =0A=
help.
=0A=
=0A=
=0A=
From: =0A=
activeperl-bounces@listserv.ActiveState.com on behalf of Chris =0A=
Marshall
Sent: Wed 12/20/2006 7:40 AM
To: =0A=
activeperl@listserv.ActiveState.com
Subject: RE: DBI Oracle =
Windows =0A=
2003
=0A=
=0A=
Eric,
The DBI module is installed where ever =
the PPM =0A=
downloaded and extracted
them to, I am guessing under =
C:\perl\
My =0A=
script looks like this....
use strict;
use DBI;
my $dbh =
=3D =0A=
DBI->connect( =0A=
'dbi:Oracle:S89QERY',
=
&=
nbsp; =0A=
'username1,
&nbs=
p;  =
; =0A=
'password1',
&nb=
sp; &nbs=
p; =0A=
{
&n=
bsp; &nb=
sp; =0A=
RaiseError =3D> =0A=
1,
&=
nbsp; &n=
bsp; =0A=
AutoCommit =3D> =0A=
0
&n=
bsp; &nb=
sp; =0A=
}
&n=
bsp; =0A=
) || die "Database connection not made: $DBI::errstr";
my $sql =
=3D qq{ =0A=
SELECT DISTINCT A.LAST_NAME, A.FIRST_NAME, A.MIDDLE_NAME =
FROM
PS_NAMES A =0A=
WHERE A.EFFDT =3D (SELECT MAX(A_ED.EFFDT) FROM PS_NAMES A_ED =
WHERE
A.EMPLID =0A=
......blah blah blah......};
my $sth =3D $dbh->prepare( $sql =0A=
);
$sth->execute();
my( $lastname, $middlename, =
$firstname =0A=
);
$sth->bind_columns( undef, \$lastname, \$middlename, =
\$firstname =0A=
);
while( $sth->fetch() ) {
print "$lastname, =0A=
$middlename, =0A=
$firstname\n";
}
$sth->finish();
$dbh->disconnect();
R>
Thank =0A=
you,
Chris
At 08:30 AM 12/20/2006, you wrote:
>It =
probably =0A=
depends on how you're connecting to Oracle, and how the DBI
>and =0A=
DBD::Oracle modules are installed.
>Where are those libraries =
installed, =0A=
did you pass the DBD::Oracle test
>suite, and what is your =
DBI->connect =0A=
statement?
>
>Eric J. Roode
>
>-----Original =0A=
Message-----
>From: =
activeperl-bounces@listserv.ActiveState.com
>[
href=3D"mailto:activeperl-bounces@listserv.ActiveState.com"> mailto:active=
perl-bounces@listserv.ActiveState.com] =0A=
On Behalf Of Chris
>Marshall
>Sent: Wednesday, December 20, =
2006 =0A=
8:27 AM
>To: activeperl@listserv.ActiveState.com
>Subject: =
DBI =0A=
Oracle Windows 2003
>
>Hello,
>
>I have a script =
that =0A=
accesses an Oracle database via DBI. My script
>will ONLY =
run =0A=
properly from the Desktop folder on my Windows 2003
>Server. =
Anyone =0A=
have any idea of how I can a Perl script on a Windows
>2003 server =
using =0A=
the DBI module to perform properly somewhere OTHER
>than the =
C:\Documents =0A=
and Settings\UserName\Desktop\ folder?
>
>Any suggestions =
would be =0A=
greatly appreciated.
>
>Thank you,
>Christopher =0A=
Marshall
>Information Technology Department
>Danville =
Community =0A=
College
>
>
>__________________________________________=
_____
>ActivePerl =0A=
mailing list
>ActivePerl@listserv.ActiveState.com
>To =
unsubscribe: =0A=
href=3D"http://listserv.ActiveState.com/mailman/mysubs">http ://listserv.A=
ctiveState.com/mailman/mysubs
>________________________________=
_______________
>ActivePerl =0A=
mailing list
>ActivePerl@listserv.ActiveState.com
>To =
unsubscribe: =0A=
href=3D"http://listserv.ActiveState.com/mailman/mysubs">http ://listserv.A=
ctiveState.com/mailman/mysubs
____________________________=
___________________
ActivePerl =0A=
mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: =
href=3D"http://listserv.ActiveState.com/mailman/mysubs">http ://listserv.A=
ctiveState.com/mailman/mysubs
=0A=
=0A=
=0A=
------_=_NextPart_001_01C72444.EBE6DC60--
--===============1466054369==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1466054369==--