Re: Setting session stuff
[prev]
[thread]
[next]
[Date index for 2004/08/01]
On Sun, Aug 01, 2004 at 03:38:54PM -0500, Jay Strauss wrote:
> Not to reply to myself, but is this OK?
> __PACKAGE__->set_db('Main',$dsn,$username,$password,{AutoCommit=>1});
> my $dbh = __PACKAGE__->db_Main;
> $dbh->do(q[alter session set nls_date_format = 'yyyy/mm/dd hh24:mi:ss']);
Yes, although you don't need the $dbh temporary, and if you're on the
latest CPAN release you should be using connection() rather than set_db:
__PACKAGE__->connection($dsn,$username,$password,{AutoCommit=>1});
__PACKAGE__->db_Main->do(q[alter session set nls_date_format = 'yyyy/mm/dd hh24:mi:ss']);
Tony