[Catalyst] DB2 Connection string problem

Kenneth S Mclane ksmclane at us.ibm.com
Wed Mar 28 13:20:40 GMT 2012


From:
"Cosimo Streppone" <cosimo at streppone.it>
To:
Kenneth S Mclane/Dubuque/IBM at IBMUS
Cc:
"The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
Date:
03/28/2012 03:59 AM
Subject:
Re: [Catalyst] DB2 Connection string problem



On Tue, 27 Mar 2012 21:32:12 +0200, Kenneth S Mclane <ksmclane at us.ibm.com> 
 
wrote:

> am able to connect from Perl directly with a quick test file I wrote.

Ok, then you're 99% done.

> I just cannot figure out how Catalyst passes/parses the arguments.

Maybe you could start by posting your working perl code
and then people on the list can help you transpose
that to the relevant Catalyst parts/plugins?

Just an idea.

-- 
Cosimo

Here is my perl script that connects:

#!/usr/bin/perl
use DBI;
use DBD::DB2::Constants;
use DBD::DB2;

$db="dbname";
$hostname="server.fqdn";
$port="55555";
$user="user";
$pass="password";
$string = "dbi:DB2:DATABASE=$db; HOSTNAME=$hostname; PORT=$port; 
PROTOCOL=TCPIP;";

if ($dbh = DBI->connect($string, $user, $pass)) {
        print "Success!";
} 
else {
        print "Connection failed with error: $DBI::errstr";
}

I am trying to use the MyApp_create.pl script to create the db model and 
pull in the entire existing schema, but cannot get the script to function 
correctly, it either will not connect or gives an error about not finding 
the db on the "filesystem". Yet the above script indicates success when 
run from the same VM I am using for Catalyst.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120328/4e0266e1/attachment.htm


More information about the Catalyst mailing list