GeeCON Prague 2014*
The moose likes JDBC 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
Bookmark "Dynamic paramaters" Watch "Dynamic paramaters" New topic
Author

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
Marshal

Joined: May 26, 2003
Posts: 30580
    
154

Raj,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Dirk Schreckmann
Sheriff

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


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
jQuery in Action, 2nd edition
 
subject: Dynamic paramaters