This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Please Help!!!  Generic Database Access Class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Please Help!!!  Generic Database Access Class" Watch "Please Help!!!  Generic Database Access Class" New topic
Author

Please Help!!! Generic Database Access Class

david powell
Greenhorn

Joined: Mar 26, 2003
Posts: 2
Hi, I am developing an application in java which will query and update/delete from a database (I am currently using an Access database for a prototype). The problem I have got is that I have a database schema which has relations such as - 'one client to many products'. E.g - I have got a client table and a product table with the clients primary key as the foriegn key in the product table. Amyway, at present, I have got java classes to reflect this data structure - so my client class contains a vector of product objects. I am attemting to find a generic way of executing the sql statments - at the moment, I am hard coding all sql statements which is obviously no good! I want to be able to send an object to the database and have a generic method for 'insert' which will identify the correct table and update it. (has anyone out there developed a generic database access class?)I hope this makes sense but it is difficult to explain! Any help at all would be really appreciated! Thanks in advance!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Please Help!!! Generic Database Access Class
 
Similar Threads
How to delete and update sql table through JTable
How to create hbm files for a table which does not have a primary key.
Save parent and children on cascade - parent key not found
Many-to-many probelm help
Generic Database Class