Hi,
I have a quite simple page which I can't get to run:
[-=20
use DBIx::Database;
use DBIx::Recordset;
$db=3DDBIx::Database -> new ({'!DataSource' =3D> 'DBI:mysql:dbname=3Dmem=
phis_www',
'!Username' =3D> 'myuser',
'!Password' =3D> 'mypwd',
'!SaveAs' =3D> 'memphis_www',
'!Reconnect' =3D> 1
});
*set =3D DBIx::Recordset -> Search ({'!Datasource' =3D> 'memphis_www',
'!Table' =3D> 'user'
});
print OUT "first name: $set[0]{lastname}<br>";
-]
The error is:
[8742]ERR: 24: Error in Perl code: Can't connect( ), no database driver sp=
ecified and DBI_DSN env var not set at /usr/share/perl5/DBIx/Recordset.pm l=
ine 199
The same thing happens when I use $db instead of 'memphis_www'
in the Search statement.
The whole thing works ok when I supply all parameters directly to
DBIx::Recordset and do not use DBIx::Database at all, but this is not
really an option since I want to store database logon information in a
central location and not on each and every page again.
I use DBIx::Recordset 0.24 (from the Debian package), Embperl is 2.0b8.
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
|