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 the difference between session.abandon() vs clear()?
How do we assign page-specific attributes?
Write the different features of a Thread and a Process?
How can u deifne the benefits and limitation of using Viewstate for state management?
What is data cache in sql server?
If there are multiple update panels on the page say upd1 and upd2. There is a button placed in upd1. How can you stop upd2 to update when button placed in upd1 is clicked?
What is manifest in .net framework?
What is the difference between application state and session state in asp net?
Explain how do you deploy your asp.net application?
What is a user session?
Explain the code Access Security (CAS) in .net Framework?
Differentiate between structure and class.
List down the sequence of methods called during the page load.
What are the cookies types in asp.net?
Explain server control extensibility with reference to asp.net 2.0 ?