Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Handling Database connection error
Hi All
I have a trouble here to handle database connection error. Basically I have a program which runs 24 hours and 7 days a week continuously. In this program I connect to the database and retrieve the data after every 15 minutes. But sometime there is database connection error and which stops the program forever. Because it open the database window and ask to select the datasource, until someone click OK, program doesnt start. I have used error handling function but it doesnt stop to open that database window. Here is the Code: Option Explicit Sub Macro2() Code On Error GoTo Stoprogram With Selection.QueryTable .Connection = ODBC;DSN=ABCD;UID=user;PWD=password;SERVER=xyz;" On Error GoTo Stoprogram .Refresh BackgroundQuery:=False End With Code Stoprogram: End Sub Your help would be greatly appreciated. Thanks Harish |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS-Excel and Complex Database Handling? | Excel Discussion (Misc queries) | |||
Database Connection | Excel Programming | |||
Error handling with a handling routine | Excel Programming | |||
Error Handling when database not available | Excel Programming | |||
DataBase Connection | Excel Programming |