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 / 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 |
What are the disadvantages of using datalist?
How to identify the updated rows in a dataset?
Does executenonquery return a value?
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?
What are the drawbacks of using ado.net?
What is the difference between OLEDB Provider and SqlClient?
Explain how to pass multiple tables in datasets simultaneously?
Explain the namespaces in which .net has the data functionality class.
Which method in OLEDBAdapter is used to populate dataset with records?
What are the advantages using ado.net?
What are all the different methods under sqlcommand?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?