[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Loss of network/database connection

Posted on 2003-11-11
3
Medium Priority
?
238 Views
Last Modified: 2010-05-03
I have an application that connects to a SQL database across the network.  I have error trapping code in place (on error...) but I can't seem to trap the error then network connectivity is lost to the SQL server or there is another problem that prevents connecting to the database.  My application opens a connection at startup and leaves the connection open since it's reading/writing data every 2-3 seconds.  Is there any way to trap those errors?  If so, I could call a routine that tries to reestablish a connection every 'x' seconds instead of failing with an error message.  Thanks for any help.
0
Comment
Question by:rkbcpi
2 Comments
 
LVL 3

Accepted Solution

by:
ketapillar earned 750 total points
ID: 9726210
try adding this before you execute the sql...

If ConnSQL.State <> adStateOpen Then ConnSQL.Open

where ConnSQL is the name of your connection
0
 

Author Comment

by:rkbcpi
ID: 9732649
I thought I had that in place, but maybe I missed some spots.  I'll double check and let you know.  Thanks.
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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

831 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