• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Names of JDBC drivers

 
vgs lemu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- What are the names (and description) of the 4 JDBC drivers?
- What are the types of statements (ex. PreparedStatement)?
thanks in advance..
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The glib answer is type 1, 2 3 and 4. You'll find more useful info here.

The JavaDocs define what kinds of Statements there are - its always quickest if you look there first: Statement, CallableStatement and PreparedStatement.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JDBC forum...
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vgs lemu:
What are the names (and description) of the 4 JDBC drivers?


Paul has already answered

Originally posted by vgs lemu:
What are the types of statements (ex. PreparedStatement)?


There are three types of statements
  • Statement

  • The use of a Statement in JDBC should be 100% localized to being used for DDL (ALTER, CREATE, GRANT, etc) as these are the only statement types that cannot accept BIND VARIABLES.
  • PreparedStatement

  • PreparedStatements should be used for EVERY OTHER type of statement (DML, Queries). As these are the statement types that accept bind variables.

    This is a fact, a rule, a law -- use prepared statements EVERYWHERE. Use
    STATEMENTS almost no where.
  • CallableStatements

  • This is used to call Stored Procedure ,functions etc.


    Shailesh
     
    amit taneja
    Ranch Hand
    Posts: 813
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    what are bind variables ???

    and you mean to say that we use "statement"
    for only DDL
    and not for DML ?

    why...


    and give me the link to learn which teach in simple words how to use Preparied statements...

    guys tommorow is my technical interview test...so please answer quickly...

    i would be gr8full to you all...
    its a secnond round...
    so pls answer ...

    regards,
     
    Gregg Bolinger
    Ranch Hand
    Posts: 15304
    6
    Chrome IntelliJ IDE Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You have a tech interview over this stuff tomorrow and you don't know it yet? I hope your interviewer doesn't frequent Javaranch. No, wait, I take that back. I hope he/she does. :roll:
     
    amit taneja
    Ranch Hand
    Posts: 813
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    pls answer ..i m delibrately waiting for response..
     
    Jeanne Boyarsky
    author & internet detective
    Marshal
    Posts: 35274
    384
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Amit,
    Sun's JDBC tutorial is an excellent place to start. You can learn the basics of JDBC that way. The details, of course, can only be learned by doing. As Greg implied, the interviewer may pick up on this.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic