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

What is caching in asp.net?

0 Answers  


Explain login control and form authentication.

0 Answers  


What is a web api endpoint?

0 Answers  


What is the differences between a primary key and a unique key in sql server?

0 Answers  


Which protocol is used in a web api?

0 Answers  






Why is validation always done on the server? When does that occur?

2 Answers  


how to add cliet side event to server side? and how to register client script to sever side? wt difference these two

3 Answers   PSI Data Systems,


What is the difference between application object and session object?

4 Answers   IBS,


What is the good practice to implement validations in aspx page?

0 Answers  


Can I have a unique key as foreign key?

0 Answers  


How many Directives r in ASP.NET?

8 Answers  


What is the Difference B/W Finalize() and Dispose() in .Net?

12 Answers   HCL, IBM,


Categories