[Zope-DB] dynamic database connectivity

Charlie Clark charlie at egenix.com
Wed Jun 2 10:06:03 EDT 2004

gknath2003 at dacafe.com wrote:

> hi all,
> i am using mxODBC to connect mssql server. i need to create a connection
> dynamically using dsn,name,password obtained from the user.
> what is the best way to accomplish this task??
> As all my sqls have to use this connection, do i need to create them
> dynamically too? please advice
> Thanks in advance,
> gknath

The best thing might be to use an external method to call the mxODBC 
methods "execute" and "query" directly as Zope connection objects do 
generally not support dynamic connection parameters and the mxODBCZopeDA 
follows this practice. Note, however, that this would put your work 
outside of Zope's transaction management and should be considered as to 
whether this is the only option.


More information about the Zope-DB mailing list