Am Wednesday, 23. July 2003 18:19, schrieb Michael A Nachbaur:
> On Wednesday 23 July 2003 05:04 am, Adam Griffiths wrote:
> <SNIP>
>
> >   <esql:connection>
> >     <esql:driver>Pg</esql:driver>
> >     <esql:dburl>dbname=axkit</esql:dburl>
> >     <esql:username>postgres</esql:username>
> >     <esql:password>password</esql:password>
> >     <esql:execute-query>
> >        <!-- esql stuff here -->
> >     </esql:execute-query>
> >   </esql:connection>
>
> </SNIP>
>
> One suggestion to make your ESQL code less redundant is to put your
> connection information in environment variables.  For instance, here's a
> (slightly altered to protect the innocent) snippet from my httpd.conf:

Oh, since ESQL version $very_latest, you can do this:

<esql:connection>
  <esql:pool>default</esql:pool>
  <esql:execute-query>
    <!-- ... -->
  </esql:execute-query>
</esql:connection>

With this in your .htaccess:

PerlAddVar AxESQLPool default Pg 0 dbname=axkit postgres password

(as often as you like)
The parameters are:
 - pool name (choose freely)
 - transactions (<esql:driver transactions="??">)
 - dburl
 - username
 - password 

Matt, you did release that version, did you? It's in CVS for nearly a year 
now.

To use taglibs in general, you can do (or rather, try - I never did it myself) 
this:

my $element1 = {
        Name => 'esql:driver',
        NamespaceURI => 'http://apache.org/xsp/SQL/v2',
        Attributes => [ { Name => 'transactions', Value => 'off' } ],
};
my $element2 = {
        Name => 'esql:dburl',
        NamespaceURI => 'http://apache.org/xsp/SQL/v2',
        Attributes => [ ],
}
$e->start_element($element1);
$e->start_element($element2);
$e->characters("dbname=axkit");
$e->end_element($element2);
$e->end_element($element1);

Please tell me if it works if you try it. :-)
And don't hold your breath for AxKit 2.0, it's still some way off. It might 
take until after mod_perl 2.0 (final) is released.

-- 
CU
   Joerg


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

Reply via email to