0

Hello
I am not the master of c# ..........i need little in creating class file for database handling
I know how to connect database and different operation handling, but like to create a class file so that it be easy to connect database My problem is that I cant able to handle various exception and display appropriate message.........
Any help.......
thanks in advance

4
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by prvnkmr194
0

@adatapost
I know how to handle database .......
my problem is that when the connection is not success then my class file should be display appropriate message...........so i would like to know the different exception in open() function .........

0

No one knows all the exceptions, the best will be to inherit the exception class. But at will also be a waste you can just try/catch/finally the connection and all the exceptions will be caught.

0

-----so i would like to know the different exception in open() function .........

System.InvalidOperationExecption
System.Data.SqlClient.SqlException
System.ArgumentException

0

@james6754
I can't able understand what you try to say can you explain little bit more?

@Singlem
thats I know.......

anyway thanks for your kind help..........

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.