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 is difference between view state and session state?

681


What websites use asp.net?

738


What describes a query?

723


What is asynchronous call?

804


What is manifest in .net framework?

776


What is the web.config file in asp?

841


What is the use of express session?

741


Contrast OOP and SOA. What are tenets of each ?

1960


Is it true that a Web service must be written in .NET or not?

823


Explain the disadvantages of viewstate?

773


Where the viewstate is stored after the page postback?

866


Mention the namespace that is used to include .net data provider for sql server in .net code?

716


What is the usie of activex control in .net?

751


Explain asp.net web forms.

816


I’m having some trouble with cas. How can I diagnose my problem?

807