Set - 7

Question 1 :

What is job?

Answer :

It can be defined as a task performed by a computer system. For example, printing a file is a job. Jobs can be performed by a single program or by a collection of programs.


Question 2 :

What is Task?

Answer :

Whenever you execute a program, the operating system creates a new task for it. The task is like an envelope for the program: it identifies the program with a task number and attaches other bookkeeping information to it.


Question 3 :

How do you find the error, how can you know the number of rows affected by last SQL Statement?

Answer :

Answer1
@@errors->give the last error occurred in the current DB.
Ans. select @@rowcount

Answer2.
Use @@ERROR which returns the error number for the last Transact-SQL statement executed fro knowing the error.
Use @@ROWCOUNT which returns the number of rows affected by the last statement for finding the no of rows affected.


Question 4 :

What are the advantages/disadvantages of viewstate?

Answer :

Disadvantages - Because the view state for a given page must be kept on the server, it is possible for the current state to be out of synchronization with the current page of the browser, if the user uses the Back feature on the browser to go back in the history. Advantages - On ordinary Web Forms pages, their view state is sent by the server as a hidden variable in a form, as part of every response to the client, and is returned to the server by the client as part of a postback. However, to reduce bandwidth demand when using mobile controls, ASP.NET does not send a page's view state to the client. Instead, the view state is saved as part of a user's session on the server. Where there is a view state, a hidden field that identifies this page's view state is sent by the server as part of every response to the client, and is returned to the server by the client as part of the next request.


Question 5 :

Describe session handling in webform. How does it work and what are the limits?

Answer :

Session management in ASP.NET can be done in two ways:
Using Cookies
Encoding of URLs with Session ID