how to handle sql exceptions?

Answers were Sorted based on User's Feedback



how to handle sql exceptions?..

Answer / gomathi

Sql exception can be handled through try,catch and finally
block.

Is This Answer Correct ?    35 Yes 2 No

how to handle sql exceptions?..

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

how to handle sql exceptions?..

Answer / ashish maurya

1)Using TRy,catch,finally block.
2)using @@Error just after DML statements.

Is This Answer Correct ?    0 Yes 0 No

how to handle sql exceptions?..

Answer / prince

not possible

Is This Answer Correct ?    2 Yes 23 No

Post New Answer

More ASP.NET Interview Questions

What is the use of web.config? Difference between machine.config and Web.config?

5 Answers  


a web application needs to be created to accept the product name and quantity of a toy from a customer. After the customer has entered the product name the application needs to display the discounted price of the product to the customer (company is offering 35% discount on all products). The application should allow the customer to select the product name from a list box. and also while i'm data binding to a label with custom data binding with some declarations : "The Discounted Price is "+((System.Convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)) - ((System.convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)*0.35)). Where i need to give this declaration in asp.net 2.0.

0 Answers   Netsweeper,


What are resource file and how do we generate resource file?

0 Answers  


What is the difference between Debug.Write and Trace.Write? When should each be used?

2 Answers   Infosys,


extensibility in asp.net2.0

0 Answers  






In asp.net 3.5 we can go one page to onther page without using statemanagment concept?

1 Answers   ANR, Google, TCS,


Question asked by one of interviewer in panal is given below: We have 2 user control on same page ,1st user control contains textbox and a button while 2nd user control have label. when ever we click on button click of 1st custom control button the value of the textBox will get updated into Label of 2nd custom control. How to do this.Your help will be appreciated.

1 Answers  


What parameters can you pass in the url of the api?

0 Answers  


how to do pakaging nd deployment

1 Answers  


Do you know caching feature?

0 Answers  


what is narmalization

4 Answers   Wipro,


Explain the use of resource manager class in .net.

0 Answers  


Categories