Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic paramaters

 
Raj Joe
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 35976
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum...
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!