> I'm testing different aspects of embperl and modperl programming
> for a project
> I have.
>
> One of these aspects is database programming. I like the DBIx::Recordset
> approach to get several items, but for complex updates and single-value
> selects, DBI seems better.
>
> Well, my questions is how I will make only one connect to the
> database instead
> of connecting for each and every query. I believe there must be a simple
> solution to this, but it's nowhere to be found in the Embperl
> dox. Maybe it
> belongs somewhere else; could someone give me a pointer to a good
> place to look?
>

When running under mod_perl use Apache::DBI. Also you can create one
DBIx::Database object at the start of your script and specify the !KeepOpen
flag. Afterwards you give this Database object as !DataSource when you
create a new Recordset object, or retrive the database handle via the method
DBHdl to make a normal DBI query, update etc.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to