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 the difference between ado and ado.net?

0 Answers  


What is datacolumn and how it is used?

2 Answers  


Is it possible to load multiple tables in a Dataset?

0 Answers  


How to read data with the sqldatareader ?

0 Answers  


What is the return type of executescalar?

0 Answers  






What is ado circle?

0 Answers  


what is connection pooling ?

3 Answers   Vertex,


What is linq and entity framework?

0 Answers  


Define the executescalar method?

0 Answers  


What is ado control?

0 Answers  


What are the different layers of ado.net?

0 Answers  


What is the difference between data reader and data adapter?

0 Answers  


Categories