Menu

#545 default value not returned for column with default value

v1.2
accepted
momo
Meta data (46)
5
2012-09-25
2007-11-04
Rob Manning
No

DatabaseMetaData.getColumns(...) returns null for a column in a table that has a default value. I discovered this while using he SQuirreL SQL Client and compared it to the Sybase ASE 15 driver (both were connected to the same database and catalog, viewing the same table definition). The following table definition was used:

drop table TESTDEFAULT
GO

CREATE TABLE TESTDEFAULT
(
mycol int DEFAULT 0 NOT NULL
)
GO

Rob

Discussion

  • Rob Manning

    Rob Manning - 2007-11-04

    SQuirreL SQL Client with two sessions (top=Sybase; bottom=jTDS)

     
  • Rob Manning

    Rob Manning - 2007-11-04

    Logged In: YES
    user_id=1287991
    Originator: YES

    File Added: jtds_defval_metadata_bug.png

     
  • momo

    momo - 2009-08-24

    Thank you for reporting this error. It only applies to ASE, for MS servers jTDS provides correct default values.

     

Log in to post a comment.