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 server side routing?

708


Is a dll file an executable?

759


Define static function?

778


How u refer webservices?

1708


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

1948


What is custom events?

799


What asp.net control can embed xaml into asp.net pages?

774


How can you debug your.net application?

780


Which two new properties are added in asp.net 4.0 page class?

730


Define msil.

776


How many types of cookies are available in asp?

814


Write a code snippet to implement the indentation in json in web api.

818


What is form submit?

723


How to find out what version of asp.net I am using on my machine?

829


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

787