class TestIbmDb2 < Test::Unit::TestCase

  def test_112
    assert_expect {
      conn = DB2::connect database, user, password
      if conn
        drop = "drop table ftest"
        DB2::exec( conn, drop ) rescue nil
        create = "create table ftest ( TEST integer, \"test\" integer, \"Test\" integer  )"
        DB2::exec conn, create
        insert = "INSERT INTO ftest values (1,2,3)"
        DB2::exec conn, insert
        stmt = DB2::exec conn, "SELECT * FROM ftest"
        num1 = DB2::field_num stmt, "TEST"
        num2 = DB2::field_num stmt, 'test'
        num3 = DB2::field_num stmt, 'Test'
        var_dump( num1 )
        var_dump( num2 )
        var_dump( num3 )
      else
        print "Connection failed."
      end
    }
  end

end

__END__
int(0)
int(1)
int(2)
