Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to deal with incomaptibilities among the data types

 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hareesh,
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic