database('pg')-> prepare...
29.11.2011 23:38 пользователь "Puneet Kishor" <[email protected]> написал:

> I must be doing something wrong, but don't know what. I have the following
> database definitions in my config file
>
>    plugins:
>        Database:
>            connections:
>                pg:
>                    driver: 'Pg'
>                    ..
>                    ..
>                mysql:
>                    driver: 'mysql'
>                    ..
>                    ..
>
> Then, in my code
>
>    my $sth1 = database->('pg')->prepare(qq{
>        SELECT blah
>    });
>    $sth1->execute();
>
>    and
>
>    my $sth2 = database->('mysql')->prepare(qq{
>        SELECT blah
>    });
>    $sth2->execute();
>
> But, I get the following error in my log file
>
>    Can't connect to data source 'dbi:' 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
> /opt/local/lib/perl5/site_perl/5.14.1/Dancer/Plugin/Database.pm line 161 in
> /opt/local/lib/perl5/site_perl/5.14.1/Dancer/Handler.pm l. 90
>
> I am using Dancer::Plugin::Database 1.51
>
> --
> Puneet Kishor
> _______________________________________________
> Dancer-users mailing list
> [email protected]
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
_______________________________________________
Dancer-users mailing list
[email protected]
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users

Reply via email to