?
Solved

Loss of network/database connection

Posted on 2003-11-11
3
Medium Priority
?
236 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
[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
3 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

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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
Course of the Month10 days, 23 hours left to enroll

770 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