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
Explain about crystal report in brief?
What is a windows form application?
Name the class to be inherited for creating a custom control.
What are windows based applications?
What is form application?
What are window applications?
Explain how to net forms the windows?
What is the difference between the add() and insert() methods of a listbox control?
Which of the following position is the default docking position of the statusstrip control on the form?
Name the template that is used to create a user-defined component.
How many types of dialog boxes windows provides?
What are the properties of datacontrol?
Which method of the messagebox class is used to display a message in the message box?
How to show a ContextMenuStrip instead of cthe default ContextMenuStrip,when you rightclick on the non client area of a window's Form or when alt+space keys are pressed
What is the difference between desktop application and windows application?