Example of using DBD:ODBC to connect to Oracle with no DSN



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!)

.



Relevant Pages

  • Connecting to ODBC DB at startup
    ... Oracle tables in the table list, it asks for an id and pass. ... The problem is when I go to run a query or do anything else in the app ... Dim cnConn As ADODB.Connection ... Dim strLogin As String ...
    (comp.databases.ms-access)
  • Re: Oracle CBO / Performance Issue !!!
    ... The app is quite complex and we have experienced some ... oracle back end performance issues. ... The app schemas are also identical - ... Don't collect statistics on the tablein question or use a histogram ...
    (comp.databases.oracle.server)
  • Re: can a .NET app get access to a shared doc in SPS?
    ... But Sharepoint is storing it in its ... >> I would suggest that you provide an ASP.NET app that allows the user to ... they upload a document to ... >> using the primary key from Oracle into a document library in Sharepoint ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Future of VFP (yet again)
    ... Several years ago they tried to convert it to a web based app, ... central database a thousand miles away. ... > normal Oracle has.. ... > application right through the browser!!! ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Connection over 2000 miles
    ... performs a fair amount of networking, loading up grids and tables, ... while the app is based in Toronto, ... Oracle driver for Oracle, since there were some issues with the oracle ...
    (comp.databases.oracle.misc)