Rudy,

Thanks for your mail.  I have Postgres version 7.1, I can connect to my
database with psql and make changes, and my operating system is Sun
Solaris 5.7.  After you and Jeff wrote, I 
- reinstalled DBI-1.13 with the environment variables for DBI_DSN,
DBI_USER and DBI_PASS
- downloaded and installed DBD-Pg-1.00, with environment variables for
POSTGRES_LIB and POSTGRES_INCLUDE
- accessed perldoc with my postgres account
- got my first script to post an sql statement to my web page (but
that's all)
- checked my fetch row subroutine (couldn't find an error), and then my
second script, which instead of printing an acronym and its meaning
based on form input, simply prints out the whole acronym table.  Now I
got this error:

"Can't locate object method "execute" via package "DBI::db" (perhaps you
forgot to load DBI:db"?  Database handle destroyed without explicit
disconnect."

I think that it can't find DBI:db because I have incorrect setenv
DBI_DSN parameters.  The DBI module instructions say that it should
point to my database drivers, and that ODBC should be in there, but I
have no ODBC modules installed, and the only odbc folder I could find
was in the source directory of my postgres installation files.  Anyway,
DBI_DSN now has dbdi:ODBC:POSTGRES.  

Let me know if that's correct or if I should look elsewhere, thanks!

Christine

Rudy Lippan wrote:
> 
> > 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.
> 
> You can get the latest version of DBD::Pg from
> 'http://dbi.symbolstone.org/index.html' which is probably what you want. I
> don't think that you want be be using pg95perl5/Pg.pm.  When you get
> DBD::Pg it will make you set POSTGRES_INCLUDE, and POSTGRES_LIB which tell
> DBD:Pg where to find libpq.so and other things that are required to build
> DBD::Pg.
> 
> By the by what version of postgres are you using? Can you connect to it
> with psql? What operating system/version are you using?
> 
> > 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.
> 
> I don't know about that...
> 
> > 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.
> 
> perldoc will not let you run it as root. Create another user and then run
> perldoc as that user || you can try "su -c nobody 'perldoc DBI'" and see
> if that works.
> 
> > 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.
> 
> It is not a waste of time, for we all have to start somewhere. And as long
> as you learn something, I would consider it a worthwhile exercise.
> 
> Later,
> 
> Rudy

Reply via email to