Link to home
Start Free TrialLog in
Avatar of avi_india
avi_india

asked on

Database connection layer in java

Hi All

I need to write a database connection layer using java and jdbc. It should be able to connect to various databases including oracle, db2, sql server.

I have been able to write a small class using jdbc-odbc bridge drivers. But these drivers requires end user to create a DSN on their machine.

1. I need to know which drivers should I use  so that end users do not need to create DSN. they will just provide necessary DB information to my class and class will take care of everything.
2. Are these free drivers?
3. I have never written a complete DB layer. What are the essential methods this should have?

Depending on the answers I'll post further queries.

Regards
Ajay
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

What is the context - a web application? You can, btw, create a DSN-less connection
Avatar of avi_india
avi_india

ASKER

A standalone Java application.
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Gotta go now. Will look at these tomorrow and try them. Hopefully they will help me in addressing this problem.

Why to reinvent the wheel?
Use Hibernate instead: http://www.hibernate.org/