Results 1 to 2 of 2

Thread: JDBC connection

  1. #1
    evermore is offline Member
    Join Date
    Mar 2010
    Posts
    8
    Rep Power
    0

    Default JDBC connection

    my question that i can't find an answer to


    when you make connections
    is the general rule one query for one connection ???


    i've tested and it's possible to do many query for one connection


    what is the downside of making new connection every query you do


    what is downside of making one connection and using it for multiple queries


    what is the standard usage ???

    thanks for answer

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    The general rule is to get, use, and release a connection, statement, resultset, whateverSQLresource, in the most local manner reasonable.

Similar Threads

  1. JDBC Oracle Connection
    By Bean in forum New To Java
    Replies: 13
    Last Post: 11-06-2009, 09:06 PM
  2. JDBC Connection...
    By onlysumitg in forum JDBC
    Replies: 3
    Last Post: 08-21-2009, 12:34 PM
  3. jdbc connection problem
    By Assaf A in forum JDBC
    Replies: 0
    Last Post: 12-01-2008, 06:08 PM
  4. JDBC connection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-10-2007, 08:39 PM
  5. How to close JDBC Connection
    By Heather in forum JDBC
    Replies: 2
    Last Post: 07-15-2007, 02:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •