perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: DBIx::Database problem
Date Tue, 17 Sep 2002 00:39:23 GMT
At 4:40 PM +0200 9/16/02, Andre Landwehr wrote:
>Hi,
>
>I have a quite simple page which I can't get to run:
>[-
>	use DBIx::Database;

No need for that if you have Recordset.

>	use DBIx::Recordset;
>
>	$db=DBIx::Database -> new ({'!DataSource'   => 
>'DBI:mysql:dbname=memphis_www',
>	                        '!Username'     => 'myuser',
>	                        '!Password'     => 'mypwd',
>	                        '!SaveAs'       => 'memphis_www',
>	                        '!Reconnect'    => 1
>	                       });

I can't find any reference for !Reconnect.  But more critically I 
think you just want
	'!DataSource'	=> 'DBI:mysql:memphis_www',
I'm not sure what the dbname= will do.

Here's a typical one from my code.


     $DB = new DBIx::Database({
                                 '!DataSource'   => 'DBI:mysql:PureMessaging',
                                 '!Username'     => 'xx',
                                 '!Password'     => 'xx',
                                 '!KeepOpen'     => 1,
                                 '!SaveAs'       => 'PureMessaging',
                                 '!DBIAttr'      => {PrintError => 0,
                                                     RaiseError => 1,
                                                     AutoCommit => 1},
                             }) || throw PureM::Error::DB($DBI::errstr);

-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message