Noam

Install DBI frpm Cpan
use it like any other module i.e. use DBI;
DBI doesnt do much by itself, you need to specify a db driver,the database
driver for Oracle is called DBD::Oracle

For example to do a SELECT (i'm assuming you know SQL if not - there are a
ton of SQL tutorials out there)

use DBI;

my $user = 'noam';
my $pass = '';
my $dbh = DBI->connect("DBI::Oracle:dbname="beyond",$user,$passw ) ||
die "Error connecting: '$DBI:errstr'";

# create query
my $sql = "SELECT ....";

# prepare the stmt
my $stm = $dbh->prepare($sql) ||
die "Error preparing: '$DBI:errstr'";

# Execute
my $stm = $stm->execute ||
die "Error preparing: '$DBI:errstr'";

# Run thru the rows of the record set
while (my $row = $stm->fetchrow_arrayref)
{
my ($field1, $field2 etc...) = @{$rowref}
...etc...
}


Rgrds


Danny Lieberman
Open Solutions Israel
+972-8-970-1485(voice)
+972-54-471114(Cell)
www.opensolutions.co.il




----- Original Message ----- 
From: "Noam Rathaus" <[EMAIL PROTECTED]>
To: "Linux-IL" <[EMAIL PROTECTED]>
Sent: Wednesday, August 18, 2004 9:31 AM
Subject: Oracle Client


> Hi,
>
> I need to interface my Perl program to an existing Oracle server, I need
some
> guidance what would be the easiest way to get an Oracle Client
installation
> so that I can make use of DBI::Oracle.
>
> Guidance means... What files to download, and possibly how to install. I
am
> very newbie in Oracle so be patient :)
>
> -- 
> Thanks
> Noam Rathaus
> CTO
> Beyond Security Ltd.
>
> Join the SecuriTeam community on Orkut:
> http://www.orkut.com/Community.aspx?cmm=44441
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
>
>


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to