class TestIbmDb2 < Test::Unit::TestCase

  def test_101
    assert_expect {
      conn = DB2::connect db,user,password
      if conn
        prepare_t_string conn
        result = DB2::exec conn,"insert into t_string values(123,1.222333,'one to one')"
        if result
          cols = DB2::num_fields result
          print "col: #{cols},"
          rows = DB2::num_rows result
          print "affected row: #{rows }"
        end    
        result = DB2::exec conn,"delete from t_string where a=123"
        if result
          cols = DB2::num_fields result
          print "col: #{cols},"
          rows = DB2::num_rows result
          print "affected row: #{rows }"
        end    
      else
        print "no connection"
      end
    }
  end

end

__END__
col: 0,affected row: 1col: 0,affected row: 1 
