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
Why is it preferred to not use finalize for clean up?
Explain Optimization technique description?
What is a page life cycle? What are the events in a page life cycle?
What is sql data source control in asp.net?
What are server activated objects?
Which asp.net objects encapsulate the state of the client and the browser?
What are the validation controls available in ASP.NET?
What do you mean by View State and what is its role?
Explain method to handle error using HttpError in Web API?
What are the features of asp net?
Explain Areas in MVC?
How can we pass info between 2 asp.net pages?
What is the default authentication mode for asp.net?
What is postback request?
What is active web page?