Master of Computer Application (MCA) – Semester 5
MC0081 – .(DOT) Net Technologies – 4 Credits
(Book ID: B0974)
Assignment Set – 1 (40 Marks)
Answer all Questions Each question carries TEN marks 1. Describe the following:
oImportance of ADO.Net
oData Access Scenarios
Importance of ADO.Net
ADO.NET (ActiveX Data Object for .NET) is a set of computer software components that programmers can use to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.
ADO.NET is conceptually divided into consumers and data providers. The consumers are the applications that need access to the data, and the providers are the software components that implement the interface and thereby provide the data to the consumer. Functionality exists in the Visual Studio IDE to create specialized subclasses of the DataSet classes for a particular database schema, allowing convenient access to each field through strongly typed properties. This helps catch more programming errors at compile-time and makes the IDE's Intelligence feature more beneficial.
Data Access Scenarios
The most popular data access scenario in the Internet is the one in which a user must locate a collection of data and iterate through this data a single time. When a request for data from a Web page that you have created is received, you can simply fill a table with data from a data store. In this case, you go to the data store, grab the data that you want, send the data across the wire, and then populate the table. In this scenario the goal is to get the data as fast as possible. 2. The second way to work with data in a disconnected architecture is to grab a collection of data and use this data separately from the data store itself. This data could be either on the client machine or the server machine. Even though the data is disconnected, you want the ability to keep the data (with all of its tables and relations in place) on the client side. ADO.NET is a reflection of the data store itself, with tables, columns, rows, and relations all in place. When completed working on the client side copy of the data, the changes done to the data could be made persistent back into the data store from where the data was retrieved. The technology that enables the user or the programmer to perform this task is the DataSet.
2. With the help of a suitable example, explain the steps involved in editing, compiling and running a C# program. Ans: The “Hello C#” Program:
you can use any editor to code the program. It’s up to your convenience as to which editor to use. Listing 1 shows the coding for our “Hello C#” program:
– Listing 1 –
public static void Main()
After entering the above code in an editor, you have to perform the following steps
Save the file as Hello.cs. cs is an extension to indicate C-Sharp like .java for a Java source file. You have to supply this extension while saving your file, otherwise the code will not compile correctly. The saved file will be of the extension .cs.txt.
Compile the code by giving the following command at the command prompt:
3. Discuss the following:
•Global.asax Application File
Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file...