[Catalyst] ok against sqlite. Not working against Oracle81.Sequence problem.

David Rio Deiros drio at console.net
Mon Mar 6 22:09:18 CET 2006


On Mon, Mar 06, 2006 at 03:18:12PM -0500, Garrett, Philip (MAN-Corporate) wrote:
> > iCaught exception in radio_advertising::Controller::Contest->do_add
> > "DBD::Oracle::db prepare_cached failed: ORA-00923: FROM keyword not
> > found where expected (DBD ERROR: error possibly near <*> indicator at
> > char 34 in 'SELECT NEXTVAL ('contest_id_seq') <*>') [for Statement
> > "SELECT NEXTVAL ('contest_id_seq') "] at
> > /usr/local/lib/perl5/site_perl/5.8.3/Ima/DBI.pm line 381."
> 
> You should install Class::DBI::Oracle, which solves this problem.
> After you install it, change your classes to inherit from it instead of
> Class::DBI.

Philip,

Thanks for your answer.
I had already Class:DBI::Oracle installed and up2date.

My current main class looks like:

package radio_advertising::Model::DBI;
use base 'Catalyst::Model::CDBI::Plain';
use base 'Class::DBI::FromForm';
use base 'Class::DBI::AsForm'; 

#__PACKAGE__->connection('dbi:SQLite:./radio_advertising.db', '', '');
__PACKAGE__->connection('dbi:Oracle:oranbc_two','nbcmv','mediav');
                                               
package radio_advertising::Model::CDBI::Contest;
use base 'radio_advertising::Model::DBI';
                             
__PACKAGE__->table('contest');                                       
__PACKAGE__->columns(All => qw/id name recipient_email contact_name marketing_company contact_phone contact_email image_upload/);
__PACKAGE__->sequence('contest_id_seq');

package radio_advertising::Model::CDBI::Stationcontest;
use base 'radio_advertising::Model::DBI';
.......

I don't have any reference to Class:DBI. I am now sure how to modify that.
Can you advice me?

Thanks,

David



More information about the Catalyst mailing list