Solved

Loss of network/database connection

Posted on 2003-11-11
3
231 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
3 Comments
 
LVL 3

Accepted Solution

by:
ketapillar earned 250 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 60
Put text in a picture ASP.NET C# 2 57
Copy a row 12 62
How to read File Date Created using VB6 8 39
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 …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

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