I try this solution but I've got this error
this is strange, depend on Apache configuration, data arrive and
I've got this error in /var/log/httpd/error.log
with cgi-script
[Thu Apr 11 15:50:35 2013] [error] [client 192.168.0.19]
DBD::Proxy::db connected failed: Can't store CODE items at
/usr/local/lib64/perl5/Storable.pm line 339, at
/usr/local/share/perl5/RPC/PlServer/Comm.pm line 91, referer:
http://m.maison/dispatch.cgi/navbar_login/echeancier/181
not work at all with Plack::Handler
Warning caught during route execution: DBD::Proxy::db connected failed: Can't store CODE items at /usr/local/lib64/perl5/Storable.pm line 339, at /usr/local/share/perl5/RPC/PlServer/Comm.pm line 91
/usr/local/lib64/perl5/Storable.pm
around line 339
336 my $da = $@; # Don't mess if called from exception handler
337 my $ret;
338 # Call C routine mstore or net_mstore, depending on network order
339 eval { $ret = &$xsptr($self) };
340 logcroak $@ if $@ =~ s/\.?\n$/,/;
341 $@ = $da;
342 return $ret ? $ret : undef;
Le 11/04/2013 15:43, Stefan Hornburg
(Racke) a écrit :
On 04/11/2013 03:20 PM, Hugues Max wrote:
I'm going to migrate a very very old Microsoft Access application, during a certain time I need ton send and read data in MS Access.
I've compiled this small script for windows, and it run on same machine as MS Access and this script listen on port 2000
use strict;
my @tableau;
$tableau[0] ='--localport=2000';
$tableau[1]='--debug';
require DBI::ProxyServer;
delete $ENV{IFS};
delete $ENV{CDPATH};
delete $ENV{ENV};
delete $ENV{BASH_ENV};
DBI::ProxyServer::main(@tableau);
exit(0);
my connection is here
my $dsn = "DBI:Proxy:hostname=$IP;port=$PORT;dsn=DBI:ODBC:$ODBC";
my $dbh = DBI->connect($dsn, "", "") || die "Erreur de connexion à la base";
and
my $sth = $dbh->prepare($sql);
$sth->execute();
I tried to configure with config.yaml
Plugins:
Database:
connections:
Access:
driver: 'Proxy:hostname=192.168.0.19;port=2000;dsn=DBI:ODBC:myodbconnection'
connection seem to be ok
how I can call db handle ?
if I use something like
my $line = database('Access')->quick_select('CommandeBNP', {Ckey => params->{Ckey} } );
SQL language from |Dancer::Plugin::Database <https://metacpan.org/module/Dancer::Plugin::Database>;| is wrong and Access stop this this error
my $dbh = database('Access');
my $sth = $dbh->prepare($sql);
$sth->execute();
database('Access') gives you DBI database handle object with some extra methods.
Regards
Racke