Solved

ado connection

Posted on 2004-04-07
5
318 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
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 50 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

785 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