Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: number of times do we need to connect ?

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question number of times do we need to connect ?

    I execute number of SQL statements on server side.........and for every execution I open the connection with database and close it .........

    Help me whether this method is correct or not..........Or Connecting with database once when starting the server...and then keeping the connection open........

    Thank you


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: number of times do we need to connect ?

    Quote Originally Posted by bora.pradnya View Post
    I execute number of SQL statements on server side.........and for every execution I open the connection with database and close it .........

    Help me whether this method is correct or not..........Or Connecting with database once when starting the server...and then keeping the connection open........

    Thank you
    Welcome to Java Programming Forums. I hope by asking this question, half of answer you stated yourself. Well, did you ever hear or know the concept Connection Pooling?

Similar Threads

  1. Replies: 27
    Last Post: February 17th, 2011, 05:42 PM
  2. Replies: 3
    Last Post: January 28th, 2011, 09:37 AM
  3. tick tack toe hard times!!
    By JpJ in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 12th, 2010, 08:15 AM
  4. Replies: 1
    Last Post: October 16th, 2010, 03:32 PM
  5. GuessWhat- same errors repeated 4 times?
    By iank in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 5th, 2009, 08:32 PM