<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Essential guide to the Ruby driver for DB2</title>
	<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/</link>
	<description>By Antonio Cangiano, Software Engineer &#38; Technical Evangelist at IBM</description>
	<pubDate>Sat, 17 May 2008 10:43:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Michele</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2689</link>
		<dc:creator>Michele</dc:creator>
		<pubDate>Thu, 06 Mar 2008 17:42:31 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2689</guid>
		<description>I Gerardo, do you remember:
http://www.ruby-forum.com/topic/123595#642637

My problem is updgrade the db2connet. 
What is "Agente" that prevent me to upgrade?

Thank's Michele.

(P.S. sorry for my bad english)</description>
		<content:encoded><![CDATA[<p>I Gerardo, do you remember:<br />
<a href="http://www.ruby-forum.com/topic/123595#642637" rel="nofollow">http://www.ruby-forum.com/topic/123595#642637</a></p>
<p>My problem is updgrade the db2connet.<br />
What is &#8220;Agente&#8221; that prevent me to upgrade?</p>
<p>Thank&#8217;s Michele.</p>
<p>(P.S. sorry for my bad english)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: METS Standard with IBM DB2 Express C using XForms as user-interface and Ruby on Rails as a Rest Web-services &#171; .$null@dscape/08</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2569</link>
		<dc:creator>METS Standard with IBM DB2 Express C using XForms as user-interface and Ruby on Rails as a Rest Web-services &#171; .$null@dscape/08</dc:creator>
		<pubDate>Tue, 26 Feb 2008 03:01:42 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2569</guid>
		<description>[...] Ruby and DB2 Guide [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Ruby and DB2 Guide [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerardo Santana</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2488</link>
		<dc:creator>Gerardo Santana</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:01:22 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2488</guid>
		<description>For Nathan, may I suggest you to read this:

http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

it may change your opinion about blocks.

Sometimes getting the job done is not as good as getting the job done in a secure way.</description>
		<content:encoded><![CDATA[<p>For Nathan, may I suggest you to read this:</p>
<p><a href="http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization" rel="nofollow">http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization</a></p>
<p>it may change your opinion about blocks.</p>
<p>Sometimes getting the job done is not as good as getting the job done in a secure way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antonio Cangiano</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2487</link>
		<dc:creator>Antonio Cangiano</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:00:23 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2487</guid>
		<description>No problem Gerardo, and thanks for stopping by and commenting. :)

In associating me with the ibm_db driver you are not far off. I initially developed the adapter for Rails using the ibm_db driver and I'm active in promoting and supporting DB2 and Ruby/Rails, since I'm part of the IBM DB2 team. Searching for ibm_db, you'll find my name all over the place. :-P However it is a different team that develops the driver from Sam Ruby's initial contribution. The same team also takes care of the Python driver and is currently maintaining the ActiveRecord adapter.</description>
		<content:encoded><![CDATA[<p>No problem Gerardo, and thanks for stopping by and commenting. <img src='http://antoniocangiano.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In associating me with the ibm_db driver you are not far off. I initially developed the adapter for Rails using the ibm_db driver and I&#8217;m active in promoting and supporting DB2 and Ruby/Rails, since I&#8217;m part of the IBM DB2 team. Searching for ibm_db, you&#8217;ll find my name all over the place. <img src='http://antoniocangiano.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> However it is a different team that develops the driver from Sam Ruby&#8217;s initial contribution. The same team also takes care of the Python driver and is currently maintaining the ActiveRecord adapter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerardo Santana</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2486</link>
		<dc:creator>Gerardo Santana</dc:creator>
		<pubDate>Fri, 08 Feb 2008 19:43:19 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2486</guid>
		<description>My bad Antonio, somehow I got you and rubyibm (or ibm_db) linked together in my mind.

It's sad that PHP's interface was taken, since it's ugly. But beauty is in the eye of the beholder, or so they say.

Thanks for this article. I didn't know how IBM's driver looked like.

I'm glad there's an alternative for Informix users.</description>
		<content:encoded><![CDATA[<p>My bad Antonio, somehow I got you and rubyibm (or ibm_db) linked together in my mind.</p>
<p>It&#8217;s sad that PHP&#8217;s interface was taken, since it&#8217;s ugly. But beauty is in the eye of the beholder, or so they say.</p>
<p>Thanks for this article. I didn&#8217;t know how IBM&#8217;s driver looked like.</p>
<p>I&#8217;m glad there&#8217;s an alternative for Informix users.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2485</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Fri, 08 Feb 2008 19:41:31 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2485</guid>
		<description>Thanks for writing this guide. I tried reading the docs and didn't understand how to use the driver. Now I get that it's easy. As for me I don't care about the lack of blocks, just so long as it gets the job done.</description>
		<content:encoded><![CDATA[<p>Thanks for writing this guide. I tried reading the docs and didn&#8217;t understand how to use the driver. Now I get that it&#8217;s easy. As for me I don&#8217;t care about the lack of blocks, just so long as it gets the job done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antonio Cangiano</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2484</link>
		<dc:creator>Antonio Cangiano</dc:creator>
		<pubDate>Fri, 08 Feb 2008 19:21:34 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2484</guid>
		<description>Gerardo, your snippet is definitely nice. The reason why the API is not particularly Ruby-ish is because it's a common one amongst several languages. In fact, the driver was initially extracted by Sam Ruby from the PHP DB2 extension. If you use IBM's drivers for Python or PHP, the resulting code won't be all that different. Of course in your Ruby programs, you can extend the module IBM_DB in order to include iterators and adopt a more Ruby-like API, but this isn't the aim of the tutorial. My aim with this tutorial was to clarify the basic usage of the exiting API.

Also, please note that I'm not the driver implementer, but you can forward your suggestions to opendev at us dot ibm dot com.</description>
		<content:encoded><![CDATA[<p>Gerardo, your snippet is definitely nice. The reason why the API is not particularly Ruby-ish is because it&#8217;s a common one amongst several languages. In fact, the driver was initially extracted by Sam Ruby from the PHP DB2 extension. If you use IBM&#8217;s drivers for Python or PHP, the resulting code won&#8217;t be all that different. Of course in your Ruby programs, you can extend the module IBM_DB in order to include iterators and adopt a more Ruby-like API, but this isn&#8217;t the aim of the tutorial. My aim with this tutorial was to clarify the basic usage of the exiting API.</p>
<p>Also, please note that I&#8217;m not the driver implementer, but you can forward your suggestions to opendev at us dot ibm dot com.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerardo Santana</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2483</link>
		<dc:creator>Gerardo Santana</dc:creator>
		<pubDate>Fri, 08 Feb 2008 18:24:30 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2483</guid>
		<description>Sorry, but that code hurts my eyes.

Any Ruby user will tell you that code above is not Ruby-ish, at all.

It lacks one of the most distinguishable and useful features of Ruby: blocks.

Iterations and resource management are easily written with blocks.

Maybe you can get some ideas from the following code, written with Ruby/Informix, that does the same as your second example, but with less clutter.

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&#39;informix&#39;&lt;/span&gt;

&lt;span class="no"&gt;Informix&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&#34;sample&#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&#34;db2inst1&#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&#34;mypassword&#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;&#124;&lt;/span&gt;&lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="o"&gt;&#124;&lt;/span&gt;
  &lt;span class="n"&gt;sql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&#34;SELECT * FROM EMPLOYEE&#34;&lt;/span&gt;
  &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;&#124;&lt;/span&gt;&lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="o"&gt;&#124;&lt;/span&gt;
    &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt;
    &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;each_hash&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;&#124;&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;&#124;&lt;/span&gt;
      &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;&#34;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&#39;FIRSTNME&#39;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&#39;LASTNAME&#39;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&#39;EMPNO&#39;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&#34;&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

Informix resources are automatically freed when the block ends, for any reason (normal or abnormal).

I'll try to write something about it in my blog soon.</description>
		<content:encoded><![CDATA[<p>Sorry, but that code hurts my eyes.</p>
<p>Any Ruby user will tell you that code above is not Ruby-ish, at all.</p>
<p>It lacks one of the most distinguishable and useful features of Ruby: blocks.</p>
<p>Iterations and resource management are easily written with blocks.</p>
<p>Maybe you can get some ideas from the following code, written with Ruby/Informix, that does the same as your second example, but with less clutter.</p>
<div class="highlight">
<pre><span class="nb">require</span> <span class="s1">&#39;informix&#39;</span>

<span class="no">Informix</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;sample&quot;</span><span class="p">,</span> <span class="s2">&quot;db2inst1&quot;</span><span class="p">,</span> <span class="s2">&quot;mypassword&quot;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">conn</span><span class="o">|</span>
  <span class="n">sql</span> <span class="o">=</span> <span class="s2">&quot;SELECT * FROM EMPLOYEE&quot;</span>
  <span class="n">conn</span><span class="o">.</span><span class="n">cursor</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">cur</span><span class="o">|</span>
    <span class="n">cur</span><span class="o">.</span><span class="n">open</span>
    <span class="n">cur</span><span class="o">.</span><span class="n">each_hash</span> <span class="k">do</span> <span class="o">|</span><span class="n">row</span><span class="o">|</span>
      <span class="nb">puts</span> <span class="s2">&quot;</span><span class="si">#{</span><span class="n">row</span><span class="o">[</span><span class="s1">&#39;FIRSTNME&#39;</span><span class="o">]</span><span class="si">}</span><span class="s2"> </span><span class="si">#{</span><span class="n">row</span><span class="o">[</span><span class="s1">&#39;LASTNAME&#39;</span><span class="o">]</span><span class="si">}</span><span class="s2">: </span><span class="si">#{</span><span class="n">row</span><span class="o">[</span><span class="s1">&#39;EMPNO&#39;</span><span class="o">]</span><span class="si">}</span><span class="s2">&quot;</span>
    <span class="k">end</span>
  <span class="k">end</span>
<span class="k">end</span>
</pre>
</div>
<p>Informix resources are automatically freed when the block ends, for any reason (normal or abnormal).</p>
<p>I&#8217;ll try to write something about it in my blog soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronald</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2475</link>
		<dc:creator>Ronald</dc:creator>
		<pubDate>Fri, 08 Feb 2008 12:02:59 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2475</guid>
		<description>Great tutorial, especially for us who are still trying to explore with Ruby. I have been having quite a hard time. Thanks.</description>
		<content:encoded><![CDATA[<p>Great tutorial, especially for us who are still trying to explore with Ruby. I have been having quite a hard time. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ermar</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2473</link>
		<dc:creator>Ermar</dc:creator>
		<pubDate>Fri, 08 Feb 2008 09:52:58 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2473</guid>
		<description>Nice tutorial! I’ve learned a lot of things on how using them. I've feel its not complicated.</description>
		<content:encoded><![CDATA[<p>Nice tutorial! I’ve learned a lot of things on how using them. I&#8217;ve feel its not complicated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Essential guide for the Ruby driver &#124; DB2 on Rails</title>
		<link>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2470</link>
		<dc:creator>Essential guide for the Ruby driver &#124; DB2 on Rails</dc:creator>
		<pubDate>Fri, 08 Feb 2008 08:52:50 +0000</pubDate>
		<guid>http://antoniocangiano.com/2008/02/08/essential-guide-to-the-ruby-driver-for-db2/#comment-2470</guid>
		<description>[...] number of requests about how to use the IBM_DB Ruby driver to query DB2. So I decided to create an essential guide for using the DB2 driver from Ruby. Amongst the topics I covered, there are: connecting to the database (local or remote), executing [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] number of requests about how to use the IBM_DB Ruby driver to query DB2. So I decided to create an essential guide for using the DB2 driver from Ruby. Amongst the topics I covered, there are: connecting to the database (local or remote), executing [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
