On 05/31/2007 08:17 AM, Alma wrote:
[...]
$database_handle = abc->new('test','test123');
[...]

No, the 'new' method of 'abc' returns an object of type 'abc'--not a database handle. Review the return statement in abc::new again.



sub display()
{
my $self = shift;
my $sth = $database_handle->prepare("select * from table where status

This fails because $database_handle is not a database handle. You can force it to work by defining a 'prepare' method in the 'abc' package.

[...]
I am getting an error :
Can't locate object method "prepare" via package "abc" at xyz.pm

Is it not possible the way i am trying...can anyone tell me where i am
wrong.

Thanks ,
Alma






--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to