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 / wriju b

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 ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the file through which you can customize your asp.net application?

779


Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?

791


What is request and response in asp.net?

732


Explain about the .NET framework?

829


Who is using asp.net?

694


Web API uses which library for JSON serialization?

779


Can you dynamically assign a Master Page?

766


How to find last error which occurred in Asp.net ?

946


What is IPostBack? How to use it?

853


How many types of validation are there?

717


Explain the path instructions in xaml?

769


What are the differences between application object and session object?

740


How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.

5303


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

774


What are resource file and how do we generate resource file?

776