Below is a code extract from an ASP.Net application.
The code basically reads data from the “name” field in
the “members” table and prints them onto the webpage.
Using the assumptions provided, fill in the 4 blanks below
so that the code will run correctly.
‘Assumptions:
‘conn_str is a variable that holds the connection string to
the database
‘Objects dbcomm and dbread are already declared earlier
dbcomm = New OleDbCommand("SELECT name FROM members",
conn_str)
dbread = dbcomm._______________
_____________________
response.write(_______________)
_____________________
dbread.Close()

Answer Posted / karna

dbcomm = New OleDbCommand("SELECT name FROM members",
conn_str)
dbread = dbcomm.ExecuteReader();
while(dbread.Read())
{
response.write(dbread("name"))
}
dbread.Close()

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different method of navigation in asp.net?

639


Define secured sockets layer.

602


Explain the asp.net mvc request life cycle? : asp.net mvc

575


Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?

2040


How will you load dynamic assembly?

648






What is an example of an application service provider?

545


How many types of cookies are there in asp.net?

622


If you have an application with multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers by using round-robbin load balancing. Explain which is the best approach to maintain login-in state for the users?

700


Explain advantages of caching?

621


Explain the difference between singleton and single call?

624


When cookie will expire?

687


How can we create Tree control in asp.net?

676


What is asp.net architecture?

614


Why the javascript validation not run on the asp.net button but run successfully on the html button?

629


How to manage different kinds of sessions in ASP.NET?

649