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
Which window displays messages for the status of various features provided in the visual studio .net ide?
How do I change the console application in windows?
Explain how save rerecord in the database?
Which property of the errorprovider control automatically sets to the form to which?
Explain how to add resources during runtime?
How insert record in the database?
Is form action required?
Suppose I have two combobox .. And I have some items in both combobox now I need to check the item in both combobox if same item is present in both combobox I need to display that item in message box?
What is form record?
What is a windows form application?
Explain how to split a column header in gridview using c#.net?
What is an example of form?
Where to use new keyword other than create instance?
How save rerecord in the database?
Name the template that is used to create a user-defined component.