Re: Example of using DBD:ODBC to connect to Oracle with no DSN
- From: dobomode@xxxxxxxxx
- Date: 26 Apr 2005 19:07:25 -0700
I wasn't sure if my question was clear: I'd like to see an example of
connecting to Oracle using DBD::ODBC without a DSN string, i.e. with
the "dbi:ODBC:Driver" syntax.
Thanks!
dobomode
dobomode@xxxxxxxxx wrote:
> Hello there,
>
> Currently I am using this to connect to Oracle via DBD::ODBC
>
> $dbh = DBI->connect("dbi:ODBC:sg.corp.com", $conf{'user'},
> $conf{'password'},
> {PrintWarn => 0, AutoCommit => 0,
> PrintError => 0,RaiseError => 1})
> || die "Cannot connect to Oracle database:
$DBI::errstr.\n";
>
> Works fine and smoothly.
>
> Now, since I am developing this app for people at my company to use,
I
> don't want to have everybody set up a DSN entry (sg.corp.com in the
> example above) in their control panel. Instead, I'd like to use the
> dbi:ODBC:DRIVER syntax to connect to Oracle directly bypassing the
DNS
> entries. I've searched like crazy but could not find much on the
topic.
> Anybody?
>
> Thanks!
>
> P.S. If you're curious why DBD:ODBC vs DBD:Oracle, it's the fact that
> the latter has some issues with dealing with BLOB (I've spent a full
> day troubleshooting this to no success, tried quickly ODBC and bingo
-
> magic!)
.
- Follow-Ups:
- References:
- Example of using DBD:ODBC to connect to Oracle with no DSN
- From: dobomode
- Example of using DBD:ODBC to connect to Oracle with no DSN
- Prev by Date: Re: load_dbnames() function - DBD::Oracle
- Next by Date: Re: DBD::Oracle Installation problem
- Previous by thread: Example of using DBD:ODBC to connect to Oracle with no DSN
- Next by thread: Re: Example of using DBD:ODBC to connect to Oracle with no DSN
- Index(es):
Relevant Pages
|