CBSE Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2013 > Multimedia & Web Technology > Multimedia & Web Technology - by Mr. Amrit Chhetri

CBSE CLASS XII

Multimedia & Web Technology

Previous Index Next

Q. 6. What are Connection String and DSN Connection?

ANSWER-Q5.6:
The connectivity to the Database Systems like MS Access or MySQL can be established in many ways and one of them is using Connection String inside the ASP Page. It uses the ADO object of ASP and makes the connection to the given database file residing inside the system whereas DSN uses external driver to create the connection to the database. To create a connection using DSN, a named DSN is created using ODBC interface and that named DSN is used to get connectivity to the Database file or Database System.

Q. 7. What is use of Record Set Object??

ANSWER-Q5.7:
A Record Set is a collection of records or data retrieved from a database. The database could be MS Access or MySQL. Before retrieving the records set, a connection to the database is opened using ADO object.

Q. 8. What are the difference between  

  1. Request and Response Object?
  2. Flush Method and End Method?

ANSWER-Q5.8:
The difference between Request and Response Objects are given below:

Request object Response object
It sends the request data from client's  browser. It sends the response information from the server to the client's browser.
Form() and QueryString() are two of its methods. Write and Flush are two of its methods.

The difference between Request and Response Objects are given below:

Flush method End method
It sends the previously buffered outputs to the client. It sends the buffered output.
Use of this methods does not stop the processing of the scripts further. It causes the server to stop processing the scripts further.

Q. 9. Write the ASP code that will read the values from a table using DSN and displays them into a ASP Page.

ANSWER-Q5.9:

<%
Dim Connection
Dim Recordset
Dim SQL
SQL = "SELECT * FROM BOOK_MASTER"
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
Connection.Open "DSN=dsn_name"
Recordset.Open SQL,Connection
If Recordset.EOF Then
Response.Write("No records returned.")

Else
Do While NOT Recordset.Eof  
Response.write Recordset("ISBN_NO")
Response.write Recordset("AUTHOR")
Response.write Recordset("PRICE")
Response.write "<br>"   
Recordset.MoveNext    
Loop
End If
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>

 

Previous Index Next

Submitted By : Mr. Amrit Chhetri
Computer Science Trainer/Educator, Principal Business Consultant, Social Media Strategist
Mobile : +91-9911290373, +91-9717346736
Twitter : http://twitter.com/AmritChhetriB
Facebook : https://www.facebook.com/AmritChhetriB