[CDBI] Problem with _auto_increment_value()

Perrin Harkins perrin at elem.com
Mon Nov 27 20:40:37 GMT 2006

Eric W. Bates wrote:
> This is from code that is several years old which runs fine on other
> servers with older versions of Class::DBI.

Have you tried installing the same version on this server?

> I'm getting an inexplicable error:
> Can't locate object method "last_insert_id" via package
> "DBIx::ContextualFetch::db" at
> /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI.pm line 612

I used to see that when the database connection was not getting reused 
properly.  In other words, it does the insert and then tries to read 
mysql_insertid but the connections are not the same so it's empty.  Are 
you doing anything funny in your db_Main code?

- Perrin

More information about the ClassDBI mailing list