<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">&quot;Cosimo Streppone&quot; &lt;cosimo@streppone.it&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">Kenneth S Mclane/Dubuque/IBM@IBMUS</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font>
<td><font size=1 face="sans-serif">&quot;The elegant MVC web framework&quot;
&lt;catalyst@lists.scsys.co.uk&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">03/28/2012 03:59 AM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [Catalyst] DB2 Connection string
problem</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>On Tue, 27 Mar 2012 21:32:12 +0200, Kenneth S Mclane
&lt;ksmclane@us.ibm.com&gt; &nbsp;<br>
wrote:<br>
<br>
&gt; am able to connect from Perl directly with a quick test file I wrote.<br>
<br>
Ok, then you're 99% done.<br>
<br>
&gt; I just cannot figure out how Catalyst passes/parses the arguments.<br>
<br>
Maybe you could start by posting your working perl code<br>
and then people on the list can help you transpose<br>
that to the relevant Catalyst parts/plugins?<br>
<br>
Just an idea.<br>
<br>
-- <br>
Cosimo<br>
<br>
Here is my perl script that connects:</font></tt>
<br>
<br><font size=2 color=#9f000f face="Monospace">#!/usr/bin/perl</font>
<br><font size=2 color=#8100ff face="Monospace">use </font><font size=2 face="Monospace">DBI</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 color=#8100ff face="Monospace">use </font><font size=2 face="Monospace">DBD::DB2::Constants</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 color=#8100ff face="Monospace">use </font><font size=2 face="Monospace">DBD::DB2</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br>
<br><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">db</font><font size=2 color=#a11f12 face="Monospace">=</font><font size=2 color=blue face="Monospace">&quot;dbname&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">hostname</font><font size=2 color=#a11f12 face="Monospace">=</font><font size=2 color=blue face="Monospace">&quot;server.fqdn&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">port</font><font size=2 color=#a11f12 face="Monospace">=</font><font size=2 color=blue face="Monospace">&quot;55555&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">user</font><font size=2 color=#a11f12 face="Monospace">=</font><font size=2 color=blue face="Monospace">&quot;user&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">pass</font><font size=2 color=#a11f12 face="Monospace">=</font><font size=2 color=blue face="Monospace">&quot;password&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">string</font><font size=2 face="Monospace">
</font><font size=2 color=#a11f12 face="Monospace">= </font><font size=2 color=blue face="Monospace">&quot;dbi:DB2:DATABASE=$db;
HOSTNAME=$hostname; PORT=$port; PROTOCOL=TCPIP;&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br>
<br><font size=2 color=#8100ff face="Monospace">if </font><font size=2 color=#a11f12 face="Monospace">(</font><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">dbh</font><font size=2 face="Monospace">
</font><font size=2 color=#a11f12 face="Monospace">= </font><font size=2 face="Monospace">DBI</font><font size=2 color=#a11f12 face="Monospace">-&gt;</font><font size=2 color=#8100ff face="Monospace">connect</font><font size=2 color=#a11f12 face="Monospace">(</font><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">string</font><font size=2 color=#a11f12 face="Monospace">,
</font><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">user</font><font size=2 color=#a11f12 face="Monospace">,
</font><font size=2 face="Monospace">$</font><font size=2 color=#8100ff face="Monospace">pass</font><font size=2 color=#a11f12 face="Monospace">))
{</font>
<br><font size=2 color=#a11f12 face="Monospace">&nbsp; &nbsp; &nbsp; &nbsp;
</font><font size=2 color=#8100ff face="Monospace">print </font><font size=2 color=blue face="Monospace">&quot;Success!&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 color=#a11f12 face="Monospace">} </font>
<br><font size=2 color=#8100ff face="Monospace">else </font><font size=2 color=#a11f12 face="Monospace">{</font>
<br><font size=2 color=#a11f12 face="Monospace">&nbsp; &nbsp; &nbsp; &nbsp;
</font><font size=2 color=#8100ff face="Monospace">print </font><font size=2 color=blue face="Monospace">&quot;Connection
failed with error: $DBI::errstr&quot;</font><font size=2 color=#a11f12 face="Monospace">;</font>
<br><font size=2 color=#a11f12 face="Monospace">}</font>
<br>
<br><font size=2 face="sans-serif">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 &quot;filesystem&quot;.
Yet the above script indicates success when run from the same VM I am using
for Catalyst.</font>