Solved

ado connection

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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…

828 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