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 a viewstate?

566


How many types of state management are there in asp net?

518


Explain Features in ASP.NET

572


Explain the difference between Web Garden and Web Farm?

547


What is asp.net with mvc? : Asp.Net MVC

516






What is cookies cache and session?

540


Explain serialization and deserialization?

542


What is query string in asp.net?

559


What are the Types of state management techniques

556


What is http pipeline in asp.net?

509


Explain how does asp page work?

574


how can create login from create and written conde in asp.net

1777


What is rending process in ASP.NET?

613


Explain the difference between debug.write and trace.write? When should each be used?

554


Which method is used to perform all validation at the page level?

532