Question
What are the methods of DataSet?

Answers

It is used in disconnected architecture. It represents records in the form of Database table (Row and Column) format. It stores record of one or more tables.

Example:

1. SqlDataAdapter da;
2. DataSet ds;
3. string strconn = "Data Source=YourServerName;Initial Catalog=EMP;Integrated Security=True";
4. private void Form1_Load(object sender, EventArgs e)
5. {
6. da = new SqlDataAdapter("select * from userdet", strconn);
7. ds = new System.Data.DataSet();
8. da.Fill(ds);
9. dataGridView1.DataSource = ds.Tables[0];
10. }



Methods of DataSet:

. AcceptChanges(): This method saves changes which are made with records in a DataSet.
. Clear(): This method clears (removes) all rows from DataSet.
. Clone(): The clone method copy the structure of DataSet. Means it copy only schema not full records of DataSet.
. Copy(): It copies the whole records with structure of DataSet.
. RejectChanges(): This method discard changes which is made with DataSet and set the DataSet to previous stage (which was at first).
. HasChanges(): This method return boolean value to show whether record of DataSet has changed or not. It returns true if any changes has made and false if no other changes made.
. GetChanges(): This method keep copy of those record, which is changed or modified.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What is Connection pooling?Is it advantageous?
  • Q Describe a situation where you had a conflict with another individual, and how you dealt with it. What was the outcome?
  • Q If ?DEF is congruent to ?BCA, write parts of ?BCA that correspond to i) ?E ii) EF iii) DF iv) ?F
  • Q Explain about Sleep Medicine ?
  • Q Name mobile application testing tools?
  • Q Which mineral is used to make the Plaster of Paris?
  • Q What is the requirement for the purchase order items that are included when the inbound delivery is created?
  • Q What is the major non-gas contributor to the Earth's green house effect?
  • Q What is String subSequence method?
  • Q Which tennis player was stabbed by a Steffi Graf fan while playing in Hamburg 1993?
  • Q It is through the sacral portion of the lumbosacral plexus that the hip receives innervation for the actions of :