class TestIbmDb2 < Test::Unit::TestCase

  def test_180
    assert_expectf {
      conn = DB2::connect db,username,password
      if conn
        prepare_t_string conn
        result = DB2::exec(conn,"insert int0 t_string values(123,1.222333,'one to one')") rescue nil
        if result
          cols = DB2::num_fields result
          print "col: #{cols},"
          rows = DB2::num_rows result
          print "affected row: #{rows }"
        else
          print DB2::stmt_errormsg()
        end
        result = DB2::exec(conn,"delete from t_string where a=123") rescue nil
        if result
          cols = DB2::num_fields result
          print "col: #{cols},"
          rows = DB2::num_rows result
          print "affected row: #{rows }"
        else
          print DB2::stmt_errormsg()
        end
      
      else
        print "no connection"
      end
    }
  end

end

__END__
[IBM][CLI Driver][DB2/%s] SQL0104N  An unexpected token "insert int0 t_string" was found following "BEGIN-OF-STATEMENT".  Expected tokens may include:  "<space>".  SQLSTATE=42601 SQLCODE=-104col: 0,affected row: 0 
