Pankaj Kapare wrote: > Hi I tried your solution but still it is showing the same error.Can u > help me to solve this problem? > Pankaj > > ----- Original Message ----- > From: "Rob Dixon" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 27, 2003 4:38 PM > Subject: Re: Help to connect to mysql > > >> Hi Pankaj >> >> Pankaj Kapare wrote: >>> Hi, >>> I am using Net::mysql to connect with database mysql.Though sytax is >>> correct it is still giving error: >>> >>> Can't locate object method "new" via package "MySql" (perhaps you >>> forgot to load "MySql"?) at E:\PERLTR~1\perl\VALIDA~1.PL line 10. >>> Content-type:text/html >>> >>> My code is as follows: >>> >>> #!/usr/local/bin/perl >>> print "Content-type:text/html\n\n"; >>> use Net::MySql; >>> >>> my $mysql=MySql->new($DBHOST, $DBNAME, $DBUSER, $DBPASS); >> >> Your package name is wrong: >> >> Net::MySql->new(...) >>
OK, looking at the module itself it's spelled MySQL. Perl is case sensitive so you need to put the upper case SQL in properly. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]