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

What are the disadvantages of using datalist?

0 Answers  


How to identify the updated rows in a dataset?

0 Answers  


Does executenonquery return a value?

0 Answers  


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

0 Answers  


What are the drawbacks of using ado.net?

0 Answers  






What is the difference between OLEDB Provider and SqlClient?

0 Answers  


Explain how to pass multiple tables in datasets simultaneously?

0 Answers  


Explain the namespaces in which .net has the data functionality class.

0 Answers  


Which method in OLEDBAdapter is used to populate dataset with records?

0 Answers  


What are the advantages using ado.net?

0 Answers  


What are all the different methods under sqlcommand?

0 Answers  


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

0 Answers  


Categories