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
Name the two main categories of .net components.
Explain the difference between listbox and combo box?
Explain how many number of events does the timer controls?
Which method grants a lock on a resource?
What is form and its uses?
how see report periviwe
What is a windows based application?
How is anchoring different from docking?
Name the class to be inherited for creating a custom control.
What are windows based applications examples?
Name the method that has to be overridden to change the appearance of the control that is inherited from an existing control.
Which window displays messages for the status of various features provided in the visual studio .net ide?
What are controls in windows forms?
Explain something about crystal report in brief?
What is form design?