Way of updating a table other than stored procedure and
hard coded query?

Answers were Sorted based on User's Feedback



Way of updating a table other than stored procedure and hard coded query?..

Answer / javed khan

The SqlDataAdapter enables us to fill a DataSet and Update changes back to the data base.We don't have to worry about opening and closing the SqlConnection, writing update command because the SqlDataAdapter does it automatically. A SqlCommandBuilder populates insert, update, and delete commands based on the SqlDataAdapter's select statement. Use the Fill method of the SqlDataAdapter to fill a DataSet with data. Call the SqlDataAdapter's Update method to push changes back to a data base.

Is This Answer Correct ?    3 Yes 0 No

Way of updating a table other than stored procedure and hard coded query?..

Answer / raviraj

Try with transactions whose code is terse and comprehensive.
transactions offer the best alternative solutions for
updating the table content.You can either commit or
rollback the transcation by using T-sql update cpmmand in
the explicit transcation based on the where condition.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

write a sample code make use of xmltext writer

1 Answers   GCI,


Write the different features of a Thread and a Process?

0 Answers   Siebel,


How information about the user's locale can be accessed?

0 Answers   MindCracker,


Can we use html in asp.net?

0 Answers  


Explain how cookies work. Give an example of cookie abuse.

0 Answers  


What is the use of placeholder control?

0 Answers  


How Response.flush works in server.Execute ?

1 Answers   Keane India Ltd, TCS,


Difference between mvc2 and mvc3 in asp.net?

4 Answers   Wipro,


What is WebService ?

8 Answers   Tanla Solutions, Yahoo,


How does session work?

0 Answers  


What methods are fired during the page load?

1 Answers  


What is deff. saop and disco?

1 Answers  


Categories