Rudy, 

I'm studying the DBI module to get smarter on this.  I was not able to
complete installation on the Pg module (I have pg95perl5-1.2.0), because
I couldn't find Pg.pm modules in the right places.  Tried to reinstall,
but it failed on make because libpq.so.1 is missing from
usr/local/pgsql/lib. Tried checking www.cpan.org today to make sure that
I have the correct Pg module, but it was down.

So naturally the database connection for DBI/DBD::Pg failed, but at
least this time I connected to DBI.pm, w/ response "can't locate
DBD/Pg.pm in @INC."

I have DBD installed, but I didn't set the environment variables for
DBI_DSN, DBI_USER, DBI_PASS and ODBCHOME when I installed it, and I only
know 2 out of the 4 anyway. Again, more studying.    

I got no errors on the PgSQL.pm install, so it would be easier for me to
use that, presuming I can get DBD running correctly.  

Tried using perl documentation, but got only the usage index.  I can't
run perldoc, because I get a warning: Superuser must not run ~/perldoc
without security audit and taint checks.

I have a colleague who's betting this is a total waste of time, given
the ignorance I've just demonstrated.  But as long as I do the other
stuff I'm supposed to be doing, trying this out still beats learning MS
Access.

Thanks all of you for the tips!

Christine

Rudy Lippan wrote:
> 
> Christine,
> 
> >
> > However I still can't connect to my sample Postgres database.
> >
> 
> >From the code you posted, it does not look like you are using DBI, but
> rather PgSQL. You would probably be far better off using DBI, for PgSQL is
> considered 'alpha quality' || at least that is what the README on
> CPAN says.
> 
> If you have DBI/DBD::Pg installed, try this:
> 
> use DBI;
> my $dbh = DBI->connect('DBI:Pg:dbname=mydb','','') || die $DBI::errstr;
> 
> Later,
> 
> Rudy

Reply via email to