Ed Leafe wrote:
> On Feb 13, 2007, at 3:30 PM, Uwe Grauer wrote:
>
>> How can i use multiple connections in dabo?
>> Do i have to use different connection names in the cnxml-file?
>
> You can either store multiple connections in one cnxml file, or one
> each in several cnxml files. If they are in the path at startup, the
> Application object will load the definitions (but not connect). You
> can manually add cnxmls by calling self.Application.addConnectFile
> ("path/to/cnxml/file").
>
> To get any of the defined connections, you ask for them by name:
>
> self.Application.getConnectionByName("connName")
>
> -- Ed Leafe
Ok, that is a start.
Thinking about this some more, i would like to have the ability to get
connections by name out of a pool of connections.
With using only one connection in an app i'm not able to detach another
functionality. Both are running in the same connection.
If i use a connection for every form, i can't run the same form twice.
So i think it would be useful to extend the current funcionality for the
use of a connection pool.
I'm thinking of something like:
getConnectionByName(self, connName, newcon=False)
to get either the one and only connection by this name, or get a new or
open connection from a pool.
To release the connection from the pool we could have:
releaseConnectionFromPool(self, con)
Uwe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users