Saturday, 13 April 2019

30 - ADO.Net - multiple choice questions

1. DateSet contains one or more DataTables?
A. True
B. False
C. Can't say
D. None of the above

---------------------------------------------------------------------


2. Can we use DataView to Filter rows in a DataTable?

A. Yes by setting Filter property
B. Yes by setting FilterRow property
C. Yes by setting the SetFilter method
D. None of the above

---------------------------------------------------------------------


3. Which method is used to retrieve the single value?

A. ExecuteScalar
B. ExecuteReader
C. ExecuteSingle
D. ExecuteNonQuery

---------------------------------------------------------------------


4. How to load XML in DataSet?

A. Using the ReadXml method
B. Using the GetXml method
C. Both of the above
D. None of the above

---------------------------------------------------------------------


5. Which method is used to fill DataSet?

A. Populate
B. Fill
C. Open
D. Close

---------------------------------------------------------------------


6. Which object is used to Fill DataSet using the query in SQL Server?

A. DataSet
B. DataTable
C. DataAdapter
D. None of the above

---------------------------------------------------------------------


7. Which object will be used to sort the data of DataSet?

A. DataView object
B. DataSet
C. DataTable
D. DataAdapter

---------------------------------------------------------------------


8. DataSet object is

A. disconnected
B. connected
C. Can't say
D. None of the above

---------------------------------------------------------------------


9. Which is Read-only forward-only recordset?

A. DataSet
B. DataReader
C. DataAdapter
D. DataCommand

---------------------------------------------------------------------


10. Which namespace is used to fetch data from Oracle database?

A. Sql.Data
B. Sql.Data.SqlClient
C. Sql.Data.OracleClient
D. None of the above

---------------------------------------------------------------------


11. Which ADO.net object is very fast to get data from the database?

A. SqlDataAdapter
B. DataSet
C. SqlDataReader
D. None of the above

---------------------------------------------------------------------


12. What is the default specified timeout period for "SQLCommand.CommandTimeout" property?

A. 30 seconds
B. 60 Seconds
C. 90 Seconds
D. 120 Seconds

---------------------------------------------------------------------


13. What is the Full form of ADO.Net?

A. Active Display Object
B. ActiveX Data Object
C. Asp Data Object
D. Active Dot Object

---------------------------------------------------------------------


14. Which Adapter is used to get the data from the Access Database?

A. DataAdapter
B. OledbDataAdapter
C. SQLDataAdapter
D. OracleDataAdapter

---------------------------------------------------------------------


15. Which ADO.Net class provides a connected environment?

A. DataSet
B. DataReader
C.Both
D. None

---------------------------------------------------------------------


16. When to use the OleDbConnection object?

A. When we want to connect to the Oracle database.
B. When we want to connect to the Sql server database
C. When we want to connect to Office Access database
D. None of the above

---------------------------------------------------------------------


17. Which is the return type of the ExecuteScalar class?

A. System.Int32
B. object
C. Both
D. None of the above

---------------------------------------------------------------------


18. Which are command object methods?

A. ExecuteScalar
B. ExecuteNonQuery
C. ExecuteReader
D. All of the above


---------------------------------------------------------------------

19. Which of the following is not the method of DataAdapter

A. Fill
B. FillSchema
C. ReadDate
D. Update

---------------------------------------------------------------------


20. Which of the following is the benefit of the ADO.Net?

A. Interoperability
B. Disconnected Data Access
C. Store Data in multiple tables
D. All of the above

---------------------------------------------------------------------


21. ADO.Net provides the ability to process and create an in-memory database which is called

A. DataSets
B. Views
C. Tables
D. Relations

---------------------------------------------------------------------


22. It is not required to open the connection when I am using DataAdapter.

A. True
B. False

---------------------------------------------------------------------


23. Which CommandType is used to define the StoredProcedure?

A. Command.TableDirect
B. CommandType.StoredProcedure
C. CommandType.TableDirect
D. Command.Stored

---------------------------------------------------------------------


24. Which namespace is used to access the connection string from the Web.Config file?

A. Web.Configuration
B. Web.Config
C. System.Configuration
D. System.Web.Configuration

---------------------------------------------------------------------


25. SqlConnection object is used for?

A. MySql database
B. Oracle database
C. Microsoft SQL Server database
D. Access database

---------------------------------------------------------------------


26. Which method is suited best when we have aggregate values in the SELECT statement?

A. ExecuteScalar()
B. ExecuteNoQuery().
C. ExecuteReader()
D. None of the above

----------------------------------------------------------------------


27. On which object we set the properties to create a primary key for DataTable?

A. DataSet
B. DataTable
C. DataRelation
D. DataColumn

---------------------------------------------------------------------


28. Which of the following are the events of the DataTable object?

A. RowChanged
B. ColumnChanged
C. RowChanging
D. All Of the above

---------------------------------------------------------------------


29. Which Data Provider gives the maximum performance when connected to SQL Server?

A. SqlClient Data Provider
B. OLEDB Data Provider
C. Oracle Data Provider
D. All of the above


---------------------------------------------------------------------


30. If we want that the command object should return XML data then which Command object will be used?

A. GetXMLData
B. GetXml
C. ExecuteXmlReader
D. None of the above

Friday, 12 April 2019

16 - XML multiple choice questions

1. What s the full form of XML?
A. XML markup language
B Extensible markup language
C. Xaml markup language
D. Example markup language

-------------------------------------------------------------------------

2. What is the main use of XML?

A. To transport data
B. To verify data
C. To design data
D. All of the above

-------------------------------------------------------------------------

3. How to write a comment in an XML document?

A. <?----?>
B. <!-- !>
C. <!-- -->
D. </-- --/>

-------------------------------------------------------------------------

4. XML uses the features from language?

A. SGML
B. HTML
C. XSLT
D. XHTML

-------------------------------------------------------------------------

5. DTD stands for?

A. Document Test Document
B. Document Type Definition
C. Dynamic Type Document
D. All of the above

-------------------------------------------------------------------------

6. Which of the following is not XML function?

A. Store Data
B. Style Data
C. Structure Data.
D. Transport Data

-------------------------------------------------------------------------

7. Is it easy to process XML than HTML?

A. True
B. False
C. Both
D. Can't say

-------------------------------------------------------------------------

8. DOM stands for?

A. Document oriented Model.
B. Document Object Model
C. D Object Model
D. None of the above

-------------------------------------------------------------------------

9. What is used to check XML syntax errors?

A. XML validator
B. XML parser
C. Browser
D. None of the above

-------------------------------------------------------------------------

10. Which attribute is used to define namespace?

A. XMLattribute
B. Xmlns
C. XMLNamespace
D. None of the above

-------------------------------------------------------------------------

11. How to define empty XML element?

A. <simple></simple>
B. <//Simple>
C. <//Simple><//Simple>
D. None of the above

-------------------------------------------------------------------------

12. XML Schema consists

A. Properties & Methods
B. Elements & Attributes
C. Structure & Data
D. Tables & Relationships


------------------------------------------------------------------------- 
13. XML tags are
A. Case Sensitive
B. Case Insensitive
C. Complex
D. None of the above

-------------------------------------------------------------------------

14. Does XML used to Replace HTML?

A. No
B. Yes
C. Can't SAy
D. None of the  above

-------------------------------------------------------------------------

15. Which allows Hyperlinks to point to specific parts of the XML documents?

A. XPath
B. XSLT
C. XLINK
D. Xpointer

-------------------------------------------------------------------------

16. Which are the predefined attributes in XML?

A. xml:lang
B. xml:space
C. Both
D. None

Sunday, 7 April 2019

16 - XML Interview questions



      1.  What is XML?
       Ans. XML stands for "Extensible Markup Language”. It must have a .xml extension. Its case sensitive markup language.

       2. What is the difference between HTML and XML?
       Ans.
       1. HTML has its own defined tags while XML has no specific tag.
       2. HTML may not contain closing tag but for XML its necessary to close tag.
       3. HTML is not case sensitive but XML is case sensitive.
       4. HTML document must have an htm or html extension while XML document must have xml extension.
     
      3. What is the version in XML?
      Ans. XML version shows which version of XML is used.

4. What are rules to write the XML document?

      Ans. 
             It should have a root element.
             Spaces are not allowed in tag names.
             All tags must be closed.
             All tags must be nested properly.
             Attributes value should appear in quotes.

5. Is XML case sensitive?

       Ans. Yes

6. What is attribute in XML?

       Ans. Attribute provides more information about an element.
`              <Employee name="Sapna">
                Here name is the attribute.

7. Can we have empty XML tags?

       Ans. Yes, empty XML tags define that elements have no textual content.  

8. What is XQuery?

       Ans. XQuery is a query language which is used to fetch data from XML document.
       
       9. Which namespace is used to work with class XmlReader?
       Ans. using System.Xml;

 10. How comment is represented in XML?

       Ans. <!- –  XML comments – ->

 11. What is XML namespace?

       Ans. XML namespace is used to avoid conflict between two tags of the same name but the different sources.XML namespace is defined using xmlns attribute at the top of the XML document.

       12. Is XML,SGML,HTML same thing?

       Ans. No

13. How Soap is related to XML?

       Ans. Soap (Simple object access protocol) uses XML to define a protocol to exchange data in distributed servers.

 14. What is XML DOM?

       Ans. XML DOM stands for Document Object Model which describes the logical structure of the XML.

15. What is XSL?

      Ans. XSL stands for the Extensible Stylesheets Language which describes how to display XML document.

16. Which language is used to describe web service in XML?
Ans. WSDL

SQL server tricky questions