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

Explain the advantages and disadvantages of using datalist?

614


What is sql connection in ado.net?

498


Which is faster sqldataadapter and sqldatareader?

498


What is the difference between data grid and data repeater?

502


How to check if the Dataset has records ?

530






What is difference in record set and dataset?

534


Explain the advantage of ADO.Net?

553


What is an orm, and why would you use one instead of plain old ado.net?

572


Which name space is used to get assembly details?

523


What are dataproviders?

549


What we do with the object of ado.net dataset after using it?

522


What is data access pattern?

493


What are dcl commands?

508


What is shadow copy?

576


What are the Features and disadvantages of dataset

556