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
What is __ requestverificationtoken?
What is the adavantage of using ASP.NET routing?
what are the web form events available in asp.net?
Where is the session stored?
What are validators and list some validators of asp.net?
How does a content page different from a master page?
Which platform does Microsoft .NET use for exchanging data between applications?
What is the difference between ASP.NET Webforms and ASP.NET MVC?
What is session handling in a webfarm, how it can work with its limits?
How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?
What is a 307 redirect?
Disable Mouse right click on web page in asp.net?
What is data control in asp.net?
Define a web service in .net?
What is the appSettings Section in the web.config file?