----- Forwarded message from "D'Roza, Ian" <Ian.D'[EMAIL PROTECTED]> -----

X-Original-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
X-Pobox-Antispam: bad_helo/ returned deny: no A or MX records found for 
nt250tisep.corporate.hdwa.health.wa.gov.au
Subject: Usinng DBI Oracle with ORacle 9.2
Date: Wed, 11 May 2005 12:44:55 +0800
From: "D'Roza, Ian" <Ian.D'[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
X-OriginalArrivalTime: 11 May 2005 04:44:56.0671 (UTC) 
        FILETIME=[2E3EF6F0:01C555E4]
X-imss-version: 2.025
X-imss-result: Passed
X-imss-scores: Clean:73.01700 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0.0000 0.0000)

   Tim,
    I am having a problem using DBI with ORacle 9.2.
   I have installed the DBD oracle and it is working my problem is

   if the windows Path variable has the oracle92 home in the beginning it works 
but if the oracle 92 home
   is in the middle or after another oracle home it does not work, even when is 
set the environment
   variable oracle_home and Path in my
   Her is a sample of the code


   sub OpenDBASession(){

   my $db=$_[1];

   my $ohome = $_[2];

   my $dbh;

   $ENV{ORACLE_SID} = "$db";

   if (! $ohome ){

   my $xml = dbaxml->new;

   $ohome = $xml->GetOratabValue("$db","home");

   }

   $ENV{ORACLE_HOME} = $ohome;

   $ENV{PATH}=sprintf("%s;%s",catfile($ohome,"bin"),$ENV{PATH});

   $dsn="dbi:Oracle:";

   delete $ENV{TWO_TASK};

   if ( $dbh = DBI->connect($dsn, "","",{ ora_session_mode => ORA_SYSDBA })){

   $sqlhandle{"$db"} = $dbh;

   }else{

   $sqlhandle{"$db"} = undef;

   return $DBI::err;

   }

   return $DBI::err;

   }

----- End forwarded message -----

Reply via email to