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 the difference between application state and session state in asp net?

510


What is autopostback in dropdownlist in asp net?

535


Is redux flux?

538


What is the Intermittent crashing of application in production?

561


What are the elements of a website?

520






What is a session in asp.net?

538


Can we use MSSql as backend in asp.net...if yes then How.?

583


Can you set the session out time manually?

382


while developing webservices if i want some users to use my webservice only how can i give security to my webservice?

1409


A Web Service Can Only Be Written In .net. Is it True??

638


3. What goals do you have in your career?

1424


What does passport and windows authentication mean in ASP.NET?

649


What are web server controls in asp.net?

554


What is a viewbag?

509


What is viewstate in asp net with example?

525