Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Diffrences among drivers

 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
if i want to write an application which is independent of all 4 types of drivers..(my application do not know about my table DDL and I am able to get it through Reverse Engineering the data model), so now i want to populate the data into the oracle database ( should work with all 4 drivers). How should deal with different sets of data types and while inserting how should i write a generic coding to support any data type.

please help me if possible code also for better understanding


thanks in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I ask why you need to support all 4 types of driver with your application? Usually, you would package the appropriate driver with your application code so don't need to worry about this. How for example can you use a Type 1 driver without knowing that the necessary native code is installed on the client machine? Only a type 4 driver can be used without any dependancies.
[ March 17, 2005: Message edited by: Paul Sturrock ]
 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MAY BE U ARE RIGHT ..

mY INTENTION IS TO MAKE MY APPLICATION WORK WITH ALL THE DRIVERS SO THAT WE CAN PROVIDE MORE FLEXIBILITY .

HOW SHOULD I DEAL THE PROBLEMS WITH DIFFERENT DATA TYPES
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First af all, please use small letters.

I couldn't get you. What kind of flexiblity you want. We likely use DAO pattern for code reusablity and flexiblity. But using all kind of drivers is meaningless. However, all the drivers has different recommendations and applied respectively.

Thanks.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And as long as you don't use database specific SQL, you can write your app to set the JDBC URL and Driver name via config properties and you should be able to swap drivers in and out and you application wont care. That's the way JDBC was designed.
 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you guys
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic