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 / chauhan rakesh botad

dbcomm = New OleDbCommand("SELECT name FROM members",
conn_str)
dbread = dbcomm.ExecuteReader()
while(dbread.Read())
response.write(dbread.GetString(1)))
dbread.NextResult()
dbread.Close(

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why and where this web.config file is used?

813


What is variable and constant in .net programming language?

623


What are the cookies types in asp.net?

776


How does session authentication work?

721


How do you create a master page?

797


How can you handle unmanaged code exceptions in asp.net?

797


What is custom attribute?

771


What is bound controls

804


Briefly describe the role of global.asax?

785


Describe the diffeerence between inline and code behind?

762


What is the biggest disadvantage of “Other Return Types” in Web API?

1187


Explain how is a property designated as read-only?

788


What are the advantages of the code-behind feature?

766


What is a postback url?

682


Why session is used in asp.net?

791