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


Please Help Members By Posting Answers For Below Questions

What are dataproviders?

718


Explain sqlconnection object?

735


What is ole db and odbc?

680


What is the difference between DataReader and DataSet in ADO.NET?

779


can we create synonymn in ms access,sql server,my sql if so explain me with example

1786


What are the different execute methods of Ado.Net?

717


What is the difference between typed and untyped dataset?

688


Explain ado.net features? Benefits? Drawbacks?

778


What are the key events of sqlconnection class?

820


What is datatable in ado.net?

682


Define data access layer?

687


What is two way data binding android?

692


What are the various methods provided by the DataSet object to generate XML?

791


Why do we use sqldataadapter?

686


What are the benefits of using of ADO.NET in .NET 4.0?

722