• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

How to deal with incomaptibilities among the data types

Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I there any way to deal with incompatibilities of datatypes.

Is there any type of coding which is generic for all kinds of drivers

I am writing a generic application in which it has to work uniformly

will the getColumnType function of ResultSetMetaData result in the same number(which represents the data type ) for all kind of drivers..

if not how we can deal that problem

Do all drivers support all kinds of data types
are there any limitations for them ( I fell JDBC ODBC bridge does not support LOBs)

please clear my doubts
author & internet detective
Posts: 41093
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best way of dealing with data type incompatibilities is to use simple data types. If you only use the basic types (varchar, numeric and date), there shouldn't be any inconsistencies. The advanced types (like clob) are not universally supported.

Yes, getColumnType always uses the same numbers. These constants are defined in java.sql.Types.
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic