• 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

Sybex 816, Chapter 10, pag. 559

 
Greenhorn
Posts: 24
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Chapter 10, pag 559, when the stored procedure with OUT parameter is described, on the code snippet it says



but then only the OUT parameter is set. While, it looks like there should be also an IN parameter from this definition (magic_number(?)). On the other hand, this should be an example of just OUT, so maybe the ? should not be there...
Or maybe I did not understand very well how these structured procedures work...
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ilenia,
In good news, CallableStatement was removed from the 819 scope. So unless you are taking the original 816 (by the end of the month), you don't need to worry about it.

IN any case, the reason this happens is because different databases use different syntax for this. At least one has the "double" parameter.
 
Ilenia Salvadori
Greenhorn
Posts: 24
2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am taking the 816 this Thursday!
So, just to see whether I understood how this work. If I have just an OUT call, the "?=" is optional, but the (?) after the call procedure name is mandatory. Right? And if I then see only "registerOutParameter" it means I have an OUT, while if I see both that and a "setInt()" for instance, it means I have an INOUT.
Is that correct?

Thank you very much for the help!
Ilenia
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is correct
 
Ilenia Salvadori
Greenhorn
Posts: 24
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much!
 
reply
    Bookmark Topic Watch Topic
  • New Topic