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

Is it possible to change the index of primary key on table?

629


What is the difference between dispose() and finalize()?

720


What are the advantages of asp.net mvc framework? : asp.net mvc

768


What is is post back property in asp net?

746


How do I use a proxy server when invoking a web service?

736


What is data grid view in asp.net?

709


What is the significance of proxy user?

815


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1860


Explain about consistent programming model in the .NET framework?

799


Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?

728


What is webresource axd?

663


Which tool you have done?

1663


What are the different methods of session maintenance in asp.net?

763


What is the asp.net control toolkit?

786


what is a .xap file? Explain with an example.

782