?
Solved

ado connection

Posted on 2004-04-07
5
Medium Priority
?
322 Views
Last Modified: 2013-11-23
i have a program that is constantly calling back and forth to a database located outside the local internet

each time i connect it take a little while to connect to the database

how do i open a connection to the database and keep it open in periods of inactivity

or any better suggestions
0
Comment
Question by:tpiazza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 10775853
what programming language are you using?
0
 
LVL 10

Accepted Solution

by:
Kavar earned 200 total points
ID: 10776042
set your connection object to global in scope, set your timeout to something like 120 seconds (anything longer and you may as well reconnect cause the db will probably time you out)
then only open your connection once at program startup, and just Check connection state before reading/writing data
0
 
LVL 16

Expert Comment

by:warturtle
ID: 10777006
Hi,

If you're using Visual Basic, then try this :

connectionObject.setTimeout(400) ;   // setting the time to wait, and be connected for about 400 seconds

This should hopefully keep the connection alive in period of inactivity.

Best Regards,

Warturtle
0
 

Author Comment

by:tpiazza
ID: 10949147
forgot about this one
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Progress
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question