<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I try this solution but I've got this error<br>
this is strange, depend on Apache configuration, data arrive and
I've got this error in /var/log/httpd/error.log<br>
<br>
with cgi-script<br>
<br>
[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:
<a class="moz-txt-link-freetext" href="http://m.maison/dispatch.cgi/navbar_login/echeancier/181">http://m.maison/dispatch.cgi/navbar_login/echeancier/181</a><br>
<br>
not work at all with Plack::Handler<br>
<pre class="error" style="font-family: 'lucida console', monaco, 'andale mono', 'bitstream vera sans mono', consolas, monospace; font-size: 12px; border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(238, 238, 238) rgb(238, 238, 238) rgb(0, 0, 0); padding: 1em; background-color: rgb(51, 51, 68); color: rgb(204, 204, 221); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">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
</pre>
<div class="title" style="font-family: 'lucida console', monaco,
'andale mono', 'bitstream vera sans mono', consolas, monospace;
font-size: 12px; background-color: rgb(170, 170, 170); color:
rgb(68, 68, 68); font-weight: bold; padding: 3px 3px 3px 10px;
font-style: normal; font-variant: normal; letter-spacing: normal;
line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;">/usr/local/lib64/perl5/Storable.pm
around line 339</div>
<pre class="content" style="font-family: 'lucida console', monaco, 'andale mono', 'bitstream vera sans mono', consolas, monospace; font-size: 12px; border-width: 0px 1px 1px; border-left-style: solid; border-left-color: rgb(170, 170, 170); padding: 1em; background-color: rgb(238, 238, 238); color: rgb(0, 0, 0); margin: 0px 0px 1em; border-right-style: solid; border-bottom-style: solid; border-right-color: rgb(170, 170, 170); border-bottom-color: rgb(170, 170, 170); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">336</span>         my $da = $@;                                # Don't mess if called from exception handler
<span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">337</span>         my $ret;
<span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">338</span>         # Call C routine mstore or net_mstore, depending on network order
<span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">339</span> <span style="color: red;">        eval { $ret = &$xsptr($self) };</span>
<span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">340</span>         logcroak $@ if $@ =~ s/\.?\n$/,/;
<span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">341</span>         $@ = $da;
<span class="nu" style="color: rgb(136, 136, 153); margin-right: 10px;">342</span>         return $ret ? $ret : undef;</pre>
<br>
<br>
<div class="moz-cite-prefix">Le 11/04/2013 15:43, Stefan Hornburg
(Racke) a écrit :<br>
</div>
<blockquote cite="mid:5166BE1B.1050701@linuxia.de" type="cite">
<pre wrap="">On 04/11/2013 03:20 PM, Hugues Max wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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 <a class="moz-txt-link-rfc2396E" href="https://metacpan.org/module/Dancer::Plugin::Database"><https://metacpan.org/module/Dancer::Plugin::Database></a>;| is wrong and Access stop this this error
</pre>
</blockquote>
<pre wrap="">
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
</pre>
</blockquote>
<br>
</body>
</html>