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



OleDbDataAdapter ole=new OleDbDataAdapter(new OleDbCommand ("select * from login",oleDbCo..

Answer / 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

More ADO.NET Interview Questions

Explain different methods and Properties of DataReader which you have used in your project?

2 Answers  


Explain the ADO . Net Architecture ?

3 Answers  


Execute nonquery returns no. of afected rows.So if my stored procedure hav lot of select stmnt, delete stmnt, insert stmnt..then what does execute nonquery returns in this case?

6 Answers   Wipro,


How to check if a datareader is closed or opened?

1 Answers  


What is the difference between Response.Expires and Reponse.ExpiresAbsolute?

0 Answers  






Define Execute Reader?

0 Answers  


What is Dataset Object?

0 Answers  


What is ado.net and its features?

0 Answers  


What is a dataset?

3 Answers  


How to add an aggregate column?

0 Answers  


Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?

0 Answers  


once data is fetched into dataset connection gets closed. but in datareader connection is always maintained...then why datareader is fast and mainly recommended ?

2 Answers  


Categories