?
Solved

Loss of network/database connection

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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

649 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