at a time earlier than now, Mark Kirkwood wrote: > Dear List, > > This may be a stupid question... but anyway... no way. Apache::DBI and DBI kind of cheat and automagically make stuff happen. it's very cool, but it can also be hard to extend or modify for specific situations. > This works great, because most of the web site uses a "generic" user to connect to >the database. However I do authentication via the database ( i.e : attempt a >connection using supplied user/pwd and if so set a cookie and continue on using the >generic user/pwd) , and these "once only" connections persist too. would it be better to query a table, maybe a system table, to verify login? i assume you are using ssl to encrypt these user/password pairs, but it doesn't seem as though you have a need for a connection. of course, it is probably just a political situation where the users who are logging in already have accounts, you don't have access to system tables b/c the dba doesn't want let you and so on. *** i did not test i am not recommending i am not responsible *** anyway... you could probably just get away with calling connect like this: DBI->connect('dbi:mysql:dbname=db','user','pass', {attr=>value}, undef, 'connect'); which will set $connect_meth to it's default value my $connect_via = "connect"; and set connect_meth to 'connect' and not 'Apache::DBI::connect' $connect_via = "Apache::DBI::connect"; so that when this code runs you are good to go without Apache::DBI. $drh->$connect_meth($dsn, $user, $pass, $attr) he he. ugh. take a look at the DBI.pm source, you'll see what's going on. aaron let me know what happens > Thus after 100 folk have logged in there are 100 ( unused ) connections. I would >like to have these authentication once only connection not persist. > > Is there any way to "by default" use persistent connections but on occasions not ? > > Thanks in advance for your help > > Mark