Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ado connection

Posted on 2004-04-07
5
Medium Priority
?
324 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

610 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