class TestIbmDb2 < Test::Unit::TestCase

  def test_049
    assert_expect {
      conn = DB2::connect database, user, password
      insert = "INSERT INTO animals (id, breed, name, weight)
        VALUES (?, ?, ?, ?)"
      select = 'SELECT id, breed, name, weight
        FROM animals WHERE weight IS NULL'
      if conn
        stmt = DB2::prepare conn, insert
        if DB2::execute(stmt, [NULL, 'ghost', NULL, NULL])
          stmt = DB2::exec conn, select
        while (row = DB2::fetch_array(stmt))
            var_dump(row)
          end
        end
      else
        puts "Connection failed."
      end
    }
  end

end

__END__
array(4) {
  [0]=>
  NULL
  [1]=>
  string(5) "ghost"
  [2]=>
  NULL
  [3]=>
  NULL
}
