Answer Posted / venky
string cns=@"server=.\SQLEXPRESS;Database=emp;Integrated Security=SSPI";
cn=new SqlConnection(cns);
string sql = "select * from mytable";
DataSet ds = new DataSet();
SqlDataAdapter adpt=new SqlDataAdapter(sql,cn);
adpt.Fill(ds,"emp1");
.....after altering table....
sqlcommandbuilder cbdr=new sqlcommandbuilder(adpt);
adpt.Update(ds,"emp1");
your changes automaically save into databases...
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the properties of datacontrol?
how print barcode
Name the method that has to be overridden to change the appearance of the control that is inherited from an existing control.
What are the forms of database?
How to split a column header in gridview using c#.net?
Name the template that is used to create a user-defined component.
Where to use new keyword other than create instance?
How to create a set up in vb.net for desktop application please say steps with examples?
What is form application?
Explain the difference between listindex and tab index?
What is the difference between desktop application and windows application?
Can you create a tabletype of recordset in Jet - connected ODBC dbengine?
What is dynamic linking?
Which property is used to specify the use of an element in the user interface and reports it to the accessibility aids?
What are windows applications?