Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

FetCh Records No 5 to 10 From Dataset

4 Answers  


Which is faster datareader or dataadapter?

0 Answers  


What are different layers of ADO.Net?

0 Answers  


Define different execute methods of ADO.NET command object ?

0 Answers   NA,


What is a data control clerk?

0 Answers  






What is different between sqlcommand object and command behavior object?

0 Answers  


How do you sort the data in datagrid?

4 Answers   Choice Solutions,


How is it possible to get 2 tables of data at a time by using data reader?

0 Answers  


Why do we need ado.net?

0 Answers  


Describe datareader object of ado.net with example.

0 Answers  


Explain what a diffgram is and its usage ?

2 Answers  


What is the difference between Data adaptor and Data set?

0 Answers   HCL,






Categories