I whish I had more... I had to debug each line of perl checking what might
be the problem to find it... I have brought it down to the select but
that's all I know.

I will change the question:

What would a small script look like, that connects to Oracle, makes a
select and prints in a while loop what has been selected?

I can't find anything anywhere that seems to work... very peculiar.

Thanks,

Nico.




At 23:49 13-5-01 -0400, Sterin, Ilya wrote:
>Are you getting an error message?  What is it?  Can't see anything wrong by
>just looking at it and "won't work" is usually not enough to detect a
>problem.  Please post more info.
>
>Ilya Sterin
>
>-----Original Message-----
>From: Nico van Leeuwen [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, May 13, 2001 11:27 PM
>To: [EMAIL PROTECTED]
>Subject: Oracle Selects ??
>
>
>The following code would work fine for me using mysql... for oracle it
>won't work and I have been trying real hard to find out why but it won't
>work.
>
>I have checked the SQL in SQL*PLUS and it worked fine!
>
>dbh->do seems to be working fine too....
>
>Thanks in advance,
>
>Nico.
>
>#!/usr/bin/perl -w
>
># Set variables
>
>use DBI;
>
>$ENV{ORACLE_HOME}  = "/opt/oracle/product/8.1.7";
>$dbh = DBI->connect('dbi:Oracle:','[EMAIL PROTECTED]','systime');
>
>       # Prepare Select
>       $sth = $dbh->prepare("SELECT id, is_admin, aktiv, passwort FROM vo_user
>WHERE login='nicovl'");
>
>       # Execute the Select
>       ($sth->execute);
>
>       @dbdata = $sth->fetchrow_array;
>
>       $userid = $dbdata[0];
>       $isadmin = $dbdata[1];
>       $aktiv = $dbdata[2];
>       $passwortdb = $dbdata[3];
>
>
>print "$userid\n";

Reply via email to