• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

conn.prepareCall

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

CallableStatement stproc_stmt = conn.prepareCall
("{call procname(?,?,?)}");

In the above statment the question mark corresponds to each column name in the table.

Is it necessary that only three columns should be present in that table ?
If we add another new column to this table, then the above statement will not be valid.

Cheers,
-Biswa
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO. The question marks correspond to the parameters to a stored procedure named "procname". You only need to change the call if you change the parameters to the procedure.

It's not in any way related to tables.
 
Swosti Dipan Pal
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks so much !!!

Suppose a table has 4 columns. We are passing those four columns in the procname. We have added another column. Is there any way to access this 5th (new column) inside the procname without updating the pocname definition ?

I mean if a table has (n) columns , is it manadatory to pass (n) parameters in the procname to access these (n) columns. Is it possible to pass (n-1) parameters in the procname and access the n columns inside the procedure.

Cheers,
-Biswa
[ April 15, 2006: Message edited by: Biswamohan Routray ]
 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure why not. Your question is wrong so it really doesn't matter what answer we give so I'll say yes.

Parameter bindings are for column values not field names but you seem to feel differently. Could you post the code for this procedure so it can be better understood what you are attempting to do here?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic