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 http protocol and how it works?

0 Answers  


I have around 200+ controls in a page. Each of the sets of controls are kept in divs and when header div is clicked, only those div controls pertaining to that header div will be displayed. Rest of the divs are kept invisible. When the page loads, all these 200+ controls are loaded simultaneously, that consumes much of the time. What my requirement is I want to get the div1 controls loaded when the page loads and rest of the div controls should be loaded asynchronously. it should not be loaded with page load, so that time for loading the page can be much minimised. Hope u understood my question and pls help me out with a solution asap....

2 Answers  


What are the elements of a website?

0 Answers  


Diff between web user control and web custom control?

0 Answers  


I have one .Net application and i have two databases which is in SQL server2000 and one more database in ORACLE? how can i access the database from different Databases?

3 Answers   eXensys,






What is a viewstate?

0 Answers  


What is the use of express session?

0 Answers  


How to authenticate users using web.config ?

2 Answers   Accenture, Amazon, BirlaSoft, Cap Gemini,


How does dataset acts in a disconnected fashion ?

3 Answers   TCS,


How do active server pages work?

0 Answers  


Explain what a diffgram is and a good use for one?

1 Answers   Siebel Systems, Syntax Softtech,


what is advantage of developing in asp.net.why the same can't be developed in Java or other web developemnt tool.what are advantages of developers.

4 Answers   IBM,


Categories