Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Looking for utility

 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Your mother is a hamster and your father smells of tiny ads!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic