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 / jerry joseph

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 ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is command line compiler.what are the steps and how it is related to debugging.

1640


What is an assembly? Explain its parts.

858


Explain asp.net web forms.

840


What do you understand from custom control?

831


What is in a session cookie?

740


What is asp.net web application?

794


What are sessions in asp net?

772


What is the significance of finalize method in .net?

801


What is http only cookie?

769


List the major built-in objects in asp.net?

763


What are the major built-in objects in ASP.NET?

854


How to rename a table using sql queries?

798


if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.

2041


In how many ways we can retrieve table records count?

777


What are the components of ado.net?

734