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 is form and its types?
How is anchoring different from docking?
What is the synonym of form?
How many types of dialog boxes windows provides?
What are windows based applications?
which property is used to change to some value to access a identity column in datacontrols?
What are controls in windows forms?
Explain about crystal report in brief?
Name the template that is used to create a user-defined component.
What is form and meaning?
Which window allows viewing the resources of the servers, such as services, processes and the event log?
What is window form application?
Is typeform free?
Explain the difference between listbox and combo box?
Which method of the messagebox class is used to display a message in the message box?