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 __ requestverificationtoken?

551


What is the adavantage of using ASP.NET routing?

644


what are the web form events available in asp.net?

558


Where is the session stored?

633


What are validators and list some validators of asp.net?

537






How does a content page different from a master page?

572


Which platform does Microsoft .NET use for exchanging data between applications?

582


What is the difference between ASP.NET Webforms and ASP.NET MVC?

607


What is session handling in a webfarm, how it can work with its limits?

621


How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?

507


What is a 307 redirect?

500


Disable Mouse right click on web page in asp.net?

580


What is data control in asp.net?

513


Define a web service in .net?

613


What is the appSettings Section in the web.config file?

581