File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Dynamic paramaters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Dynamic paramaters" Watch "Dynamic paramaters" New topic

Dynamic paramaters

Raj Joe
Ranch Hand

Joined: Oct 15, 2004
Posts: 41
I have a scenerio.

I have a stored procedure.Today I am calling the sp with 3 paramaters and is called form around 30 java programs.

Later I would like to add an other paramater to the sp signature just for the 31th java pgm.

I don't want to touch all other 30 java pgms,just because I have added one more extract paramater to sp ,to customize to the 31 th java pgm.

I feel that XML(Paramaters) and Java can help me.Can any one through light on the same.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32820

You can create a new stored procedure with 4 parameters. Have the original stored proc call this one (with the execute statement) and move the implementation to the new stored proc.

Now the 30 programs can call the 3 parameter one and the new one can call the 4 parameter one.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving to the JDBC forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: Dynamic paramaters
It's not a secret anymore!