[dancer-users] DBD::Proxy with Dancer

Hugues hugues at max4mail.com
Fri Nov 8 22:28:03 GMT 2013


Hello
I use my  DBD::Proxy to connect my program to ODBC Access Database.
with:

my $dsn      = "DBI:Proxy:hostname=$IP;port=$PORT;dsn=DBI:ODBC:$ODBC";
my $dbh = DBI->connect($dsn, "", "") || die "Erreur de connexion à la base";
         $dbh->{AutoCommit} = 1;
         $dbh->{RaiseError} = 1;

I would like to transpose this  same connection using Dancer,  in 
config.yml, but I do not arrive to pass good settings.
login and password are empty

plugins:
     Database:
         connections:
                    accesssav:
                           driver: 
"Proxy:hostname=192.168.0.19;port=2000;dsn=DBI:ODBC:accesssav"
                           database: 'accesssav'
                           username: ''
                           password: ''
                           port:      2000
                           connection_check_threshold: 3
                           #dbi_params:
                           #            RaiseError: 1
                           #            AutoCommit: 1
                           #on_connect_do: ["SET NAMES 'utf8'", "SET 
CHARACTER SET 'utf8'" ]
                           log_queries: 0




[5268] error @0.140813> [hit #1]Database connection failed - Cannot log 
in to DBI::ProxyServer: Refused by server: User  is not permitted to 
connect. at /usr/local/share/perl5/RPC/PlClient.pm line 82. in 
/usr/local/share/perl5/Dancer/Plugin/Database.pm l. 16

I try lot of  settings as
driver: "Proxy:hostname=192.168.0.19;port=2000;dsn=DBI:ODBC:accesssav"
driver: "Proxy:hostname=192.168.0.19;port=2000;dsn=DBI:ODBC:accesssav, 
'', '' "


nothing works , someone has already test Dancer with DBD::Proxy ?


More information about the dancer-users mailing list