• +91 9723535972
  • info@interviewmaterial.com

Ado.net Interview Questions and Answers

Ado.net Interview Questions and Answers

Question - 91 : - What are the methods of XML dataset object?

Answer - 91 : -

There are various methods of XML dataset object:

GetXml() – Get XML data in a Dataset as a single string.

GetXmlSchema() – Get XSD Schema in a Dataset as a single string.

ReadXml() – Reads XML data from a file.

ReadXmlSchema() – Reads XML schema from a file.

WriteXml() – Writes the contents of Dataset to a file.

WriteXmlSchema() – Writes XSD Schema into a file.

Question - 92 : - Do we use stored procedure in ADO.Net?

Answer - 92 : -

Yes, stored procedures are used in ADO.Net and it can be used for common repetitive functions.

Question - 93 : - Is it possible to load multiple tables in a Dataset?

Answer - 93 : - Yes, it is possible to load multiple tables in a single dataset.

Question - 94 : - Which provider is used to connect MS Access, Oracle, etc…?

Answer - 94 : -

OLEDB Provider and ODBC Provider are used to connect to MS Access and Oracle. Oracle Data Provider is also used to connect exclusively for oracle database.

Question - 95 : - What is the difference between Command and CommandBuilder object?

Answer - 95 : -

Command is used to execute all kind of queries like DML and DDL. DML is nothing but Insert, Update and Delete. DDL are like Create and drop tables.

Command Builder object is used to build and execute DDL queries like Create and Drop Tables.

Question - 96 : - What is the difference between Dataset.clone and Dataset.copy?

Answer - 96 : -

Dataset.clone object copies structure of the dataset including schemas, relations and constraints. This will not copy data in the table.

Question - 97 : - What is a Dataset?

Answer - 97 : -

Dataset is a disconnected copy of data that gets populated in the client PC. It contains Datatables and Datarelations. Generally, DataAdapter is required for populating a Dataset with the data.

Since it is disconnected, the user no longer need to be connected to the database every time and data manipulations are performed without interacting with the data source. It is very fast and reliable as it resides in the local system.

Two Objects in Dataset

  • DataTableCollection
  • DataRelationCollection
Two Types of Dataset

  • Typed Dataset
  • Untyped Dataset

Question - 98 : - What are the different methods by which we can populate a Dataset?

Answer - 98 : -

We can populate the Dataset using different the approaches mentioned below:

  • Using DataAdapter objects and the ‘fill’ method.
  • Programmatically creating Datatable, Datarow, and Data column objects.
  • Data from XML Documents.
  • Merging with another Dataset.

Question - 99 : - What are the types of Databinding?

Answer - 99 : -

This classification is based on the number of bound values that can be displayed through a control of the window form.

Two types of Databinding:

Simple Data Binding: It is the process of binding a control to a single data element.
For Example, Binding a textbox or label with a single value.

Complex Data Binding: It is the process of binding a component to display one data element or multiple data elements.
For Example, GridView or Listbox control binding one data element or more than one records in a table.

Question - 100 : - What are the key events of SqlConnection Class?

Answer - 100 : -

The two key events of SqlConnection are:

  • StateChange event: This event occurred when the state of the Connection changes. The event handler receives an argument (Datatype: StateChangeEventArgs) which contains the data related to that particular event.
  • InfoMessage event: This event occurred when an info message or Warning is returned from a data source. The event handler receives an argument (Datatype: SqlInfoMessageEventArgs) which contains the data related to that particular event.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners