Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Two ODBC Connections

by pajout (Curate)
on Aug 19, 2008 at 13:59 UTC ( [id://705222]=note: print w/replies, xml ) Need Help??


in reply to Two ODBC Connections

TIMTOWDI :>)
In principle, the application have to know, which connection it wants to use. My recently used solution is, __briefly__:
#configuration my $conf = " <MyConfPool> <connection id="firstconn"> ...DSN credentials </connection> <connection id="secondconn"> ...DSN credentials </connection> </MyConfPool>"; #create object holding connections use MyConnPool; my $conn_pool = MyConnPool->new(conf=>$conf); ... #use some connection my $conn1 = $conn_pool->get("firstconn"); $conn1->Sql(...); my $conn2 = $conn_pool->get("secondconn"); $conn2->Sql(...);
The goal is to implement whole maintenance of connections in that slightly described module, other parts of application will just use it, not carrying if connection is already opened e.t.c.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://705222]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found