aspose file tools*
The moose likes JDBC and the fly likes Looking for utility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Looking for utility" Watch "Looking for utility" New topic
Author

Looking for utility

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Hello All!

To select data from database we have to follow 4 steps each times:

Now since we are using WebLogic, it has its own Connection management system, so I can skip step 1) and 2).

Now for step 3) and 4) I am looking for a utility where I just have to pass a connection to the method and method will create Statement object and will execute the appropriate query.

i.e.

So whenever I have to select anything from the database, I have to do just

Similar for update/insert/delete.

Are there any utilities that this?

Reg,
Chetan
[ April 26, 2005: Message edited by: Chetan Parekh ]

My blood is tested +ve for Java.
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Originally posted by Chetan Parekh:
Hello All!

To select data from database we have to follow 4 steps each times:

Now since we are using WebLogic, it has its own Connection management system, so I can skip step 1) and 2).

Now for step 3) and 4) I am looking for a utility where I just have to pass a connection to the method and method will create Statement object and will execute the appropriate query.

i.e.

So whenever I have to select anything from the database, I have to do just

Similar for update/insert/delete.

Are there any utilities that this?

Reg,
Chetan

[ April 26, 2005: Message edited by: Chetan Parekh ]



Hi u want to use Utility class for all ur dbase connections just use DAO (Data Access object Design pattern) just grab some details abtr this dao ...
so can code ...easlily...

Thx and Regards
G R Ganesh Gowtham
grgowtham_cse@yahoo.com
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

If u r still amazed how exactly dao works...

it is nothing but class which has so many static mtd's which purely depends of ur Req and b'logic....
Thx and Regards
G R Ganesh Gowtham
grgowtham_cse@yahoo.com
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
Gowtham Ganamukala, please don't use so many abbreviations in your posts. It makes them difficult to read. As for the question, it seems as if you have a firm grasp on what needs to be written and it's quite trivial to write something like that. So, just go ahead and write it. But, if you want a more "beefed up" solution, I'd go with Spring (www.springframework.org). They've got frameworks which provide "template" classes for this sort of thing.


James Carman, President<br />Carman Consulting, Inc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Looking for utility