OleDbDataAdapter ole=new OleDbDataAdapter(new OleDbCommand
("select * from login",oleDbConnection1));
OleDbCommandBuilder cmd=new
OleDbCommandBuilder(ole);
ole.Fill(dataSet11,"login");
DataRow drow=dataSet11.Tables
["login"].NewRow();
drow[0]=textBox1.Text;
drow[1]=textBox2.Text;
drow[2]=textBox3.Text;
dataSet11.Tables["login"].Rows.Add
(drow);
ole.UpdateCommand=cmd.GetUpdateCommand();
ole.Update(dataSet11,"login");
MessageBox.Show("one row added");
this gives exception.how to solve it
Answer Posted / shiva
what is the exception your faced????????
may be the exception is where your declare dataset11
in diconnected model we hav to declre the dataset then only
data willbe fiied in our application.......
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.
What are the different ado.net namespaces are available in .net?
What is ole db query?
What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is the difference between Response.Expires and Reponse.ExpiresAbsolute?
Do you use stored procedure in ado.net?
What is the default Timeout for SqlCommand.CommandTimeout property?
Explain the difference in an abstract class and an interface?
Define the executescalar method?
What are the Features and disadvantages of dataset
What are disadvantages of microsoft-provided data provider classes in ado.net?
What are the benefits of ADO.NET?
How do you merge 2 datasets into the third dataset in a simple manner?
What are the disadvantages of using datalist?
What is the difference between dataset and datatable?