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 / karna

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of authentication in asp.net?

551


What are the advantages of using session?

436


What is the Intermittent crashing of application in production?

561


What are session state modes? List some of the important session state modes of asp.net.

535


Explain model, view and controller represent in an mvc application? : asp.net mvc

515






Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?

572


Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?

810


What is the parent class of all web server control?

539


What is difference between datalist and gridview?

581


Can a master page have more than one contentplaceholder?

508


How do active server pages work?

548


How many types of file extensions for razor views in ASP.Net MVC?

577


Describe the disadvantage of cookies.

599


Explain an object, class and method.

560


Differentiate between client-side and server-side validations in web pages.

559