mr.dunstan has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone out there used DBIx::XML_RDB connecting to Oracle? I'm a little confused on the connection string ... what should I put in for the driver? Please believe me, I have poked all around looking for the answer!

my $xmlout = DBIx::XML_RDB->new("dbi:Oracle:databasename", "???", "use +rid", "password") || die;
- mr.dunstan

"There are only 35 chambers, there is no 36th."
"I know, I want to create a new one... " - Shaolin Master Killer

Replies are listed 'Best First'.
(jeffa) Re: DBIx::XML_RDB and Oracle?
by jeffa (Bishop) on Jun 21, 2001 at 00:49 UTC
    mr.dunstan,
    I have used DBIx::XML_RDB successfully at work, where we used Oracle. Unfortunately, i no longer work at that place, and they seized my computer before i could save anything.

    What i can offer you is this - you are *this* close - the ??? is the name of the database you wish to use. I can't test this, but according to the docs for DBD::Oracle and the code for DBIx::XML_RDB, this should connect:

    my $xmlout = new DBIx::XML_RDB("Oracle:$dbname",$user,$passwd); # this works for MySQL - i know, i know . . . but still . . . my $xmlout = new DBIx::XML_RDB(qw(database:host driver usr passwd));
    Even in my DBIx::XML_RDB Tutorial, i mentioned that i had to play with the connection string to get it to work. Why? Because i think the author made a small mistake: he creates the connection string inside the module instead of just passing it off to the appropriate driver module verbatim:
    $self->{dbh} = DBI->connect("dbi:$driver:". $self->{datasource}, $user +id, $password); #instead of simply $self->{dbh} = DBI->connect(@_); # should i offer a patch?

    Keep playing, you'll get it. And when you do, please reply to this node with your answer so that others may benefit.

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--
    
Re: DBIx::XML_RDB and Oracle?
by BigJoe (Curate) on Jun 20, 2001 at 21:35 UTC
    Did you try Oraperl?

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.
      Thanks for your reply.

      Yeah, I've been trying to sort this whole oraperl thing out - the thing I'm confused about is:

      If you're making the connection through DBIx::XML_RDB, then I'm not sure exactly how I'm supposed to be using oraperl. I mean - i've tried using "DBD::Oraperl" and "Oraperl" as the driver but no luck!

      Sigh. mr.dunstan
      "There are only 35 chambers, there is no 36th."
      "I know, I want to create a new one... " - Shaolin Master Killer
        Well I opened up the XML_RDB.pm file and looked at the function that uses the driver and this is what it showed
        $self->{dbh} = DBI->connect("dbi:$driver:". $self->{datasource}, $user +id, $password);
        Which leads me to believe if you put "Oracle" as your driver and have DBD::Oracle installed properly it should work.

        --BigJoe

        Learn patience, you must.
        Young PerlMonk, craves Not these things.
        Use the source Luke.