Update table using SqlDataAdapter using System; using System.Data; using System.Data.SqlClient; class PropagateChanges { static void Main(){ string connString = 'server=(local) SQLEXPRESS;database=MyDatabase;Integrated Security=SSPI'; string qry = @'select * from employee '; string upd = @'update employee. Inserting, updating, and deleting rows using the SADataAdapter object. The SADataAdapter retrieves the result set into a DataSet. A DataSet is a collection of tables and the relationships and constraints between those tables. The DataSet is built into the.NET Framework, and is independent of the Data Provider used to. Your question is similar to how to update a view. Actually, not all the views can be updated, however, there're some of them can be updated. If the view cannot be updated (and also, it is not recommended to update a view directly), you could set the UpdateCommand property of the SqlDataAdapter. For more information, you could visit and The first link is the API reference of UpdateCommand and it has a sample for it. And the second link is a KB article to describe how to use SqlDataAdapter to update the database. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
July 2018
Categories |