how to handle sql exceptions?
Answers were Sorted based on User's Feedback
Answer / gomathi
Sql exception can be handled through try,catch and finally
block.
| Is This Answer Correct ? | 35 Yes | 2 No |
Answer / minhajul islam
using try block we can trap the error as follows
try
{
//Datanase coding
}
catch(SQLException e1)
{
//Here you will get SQL Error message in e1 instance
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ashish maurya
1)Using TRy,catch,finally block.
2)using @@Error just after DML statements.
| Is This Answer Correct ? | 0 Yes | 0 No |
What does aspcompat="true" mean?
How to reduce the width of textbox in editcommandcolumn of datagrid?
How do you manage session in ASP and ASP.NET?
What is the use of placeholder control? Can we see it at runtime?
How we can set Different levels of Authentication in .Net? What are the difference between Windows Authenticatin, Passport Authentication and Form Authentication?
What is bound controls
What is the use of ASP.NET routing?
What is the significance of proxy user?
How can you achieve nested Masterpages in 2.0?
what is asp.net
What are the objects of ASP.NET ?
What is a WebService and what is the underlying protocol used in it? Namespace?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)