473,378 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Issue with Enterprize Library

Hi,
How can I detect when there is a problem connecting to tha database and
simpley resume. This is my current code

Dim db As Database = DatabaseFactory.CreateDatabase()
Dim DR As SqlDataReader

Try

DR = db.ExecuteReader(CommandType.Text, "select * fromtest")

While DR.Read

MsgBox(DR.Item(0))

End While

Catch ex As Exception

MsgBox(ex.Message)

Finally

If (Not DR Is Nothing) Then
DR.Close()
End If

End Try

Instead of displaying a message I would perfero to log to file but how do I
trap when it was unable to connect to the dataabase. I was looking into the
Windows Instrumentation (WMI) Events. How can I trap these?

Thanks
Oct 4 '05 #1
0 991

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Frodo | last post by:
I have a problem establishing a link between Visual Studio.NET 2003 and SQL Server 2000. Both are installed on a Windows Server 2003, standard version. Visual Studio.NET Issues...
30
by: Kong Bhat | last post by:
With XML becoming the de facto data description standard, I am extremely surprised that there is no movement towards standardizing an xml library API for use with C and C++. Personally I have been...
6
by: Kerry Sanders | last post by:
I am working on a project for work where I need a specialized type converter to convert the value of a string which is edited in a grid back to the underlying object type from the cell. The value...
2
by: Sai Kit Tong | last post by:
I have a native (legacy) library created with Visual Studio 6.0. It utilizes STL for its string operation. In addition, most of public members of the classes in this library return or use STL...
11
by: scorpion53061 | last post by:
in my head...... I need my application to work with Office 97, 2000, XP and 2003 versions of MS Word and MS Excel. IN order to acomplish this I have to install in different folders: 1....
4
by: Scott Glasgow | last post by:
I have the Microsoft Visual Basic .NET Deluxe Learning Edition from Microsoft and am trying to reinstall it after a hardware system crash requiring complete reformat/reinstall of Windows XP Pro and...
10
by: Brian Parker | last post by:
I inherited a C++ DLL that I need to remotely call multiple times asynchronously. What I have developed is: CSharp web application that makes asynchronous calls to a CSharp Web Service. The...
6
by: Palvinder Singh | last post by:
Hello google group peeps, I am new to remoting, but have a grasp of it. I am trying to create a server/client application, which will be deployed over an intranet. I have upwards of five...
0
by: muddasirmunir | last post by:
i had only use sqlserver personal editon 2000 can any body tell me what is the diff b/w sqlserver 2000 enterprize editon and sqlserver2000 personal edittion.
5
by: blaine | last post by:
The wxPython group is a bit stale compared to this group, so I'll give it a shot :) (READ: Originally when I started htis post, Python 2.5 at the shell did not work (identical behavior to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.