On Tue, Jul 22, 2008 at 9:18 AM, Panda-X <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I've got this error, anything I can do ?
>
>      "Can't locate auto/DBI/data_source.al in @INC "
>
> Code :
>
>   use DBI;
>   my @dataSource = DBI -> data_source ( "mysql" ) ;
>
> and if I change the as this :
>
>    use DBI;
>    my $dbh = DBI -> connect ( "dbi:mysql", $adm, $pass ) ;
>
> I got this error :
> Can't connect to data source 'dbi:mysql' because I can't work out what
> driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the
> DBI_DRIVER env var is not set) at quickPerl.pl line 8
>
> I have MySQL server installed and it works well with other applications.
>
> Thanks for help!
>

Is it because you have not specified the database name in the following
connect statement :-

   use DBI;
   my $dbh = DBI -> connect ( "dbi:mysql", $adm, $pass ) ;


Regards,
Amit Saxena

Reply via email to