• 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

JDBC Statements

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are different type of JDBC statement :

statement
prepared statement
callable statement

please let me know if i missed any other type.
i have to know the difference between those statements and advantages and disadvantages over one another.

 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the JavaDocs:
http://java.sun.com/javase/6/docs/api/java/sql/Statement.html
 
Ranjan Barua
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sagar,

I have read those, but this doc really not help me so much, so can you please provide me anything else.
 
Ranch Hand
Posts: 874
Android VI Editor Java
 
Ranjan Barua
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Balu,

I am expecting ans or a link which provide me exact ans, i have done lots of googling on it.
Please provide me specific link or ans.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ranjan,
No one here tell any thing diffrent from the what is there on the web. JavaDocs is always a great source when it comes to explainig the (any)classes.

Still,
Here is my answer.

Statement is the BASE class who will execute the single SQL query.
PreparedStatement (extends Statement)is precompiled SQL query which can be executed repeatedly by changing the input param.
CallableStatement is a subclass of PreparedStatement to execute Store Procedure.
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the Java™ Tutorial section any use to you?
 
Paper beats rock. Scissors beats tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic