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 use of placeholder control? Can we see it at runtime?
What are the data controls available in asp.net?
Explain the main function of razor in asp.net? : asp.net mvc
How do I open an ashx file in windows 7?
How can you handle exceptions in asp.net?
State differences between MVC and WebAPI
What is the extension of master page in asp.net?
Explain about Automatic resource management?
What are the events in a page life cycle?
What is the best Macanism to clear the Cache in asp.net
Explain the difference between response.redirect vs server.transfer
What language is asp.net written in?
What is query string in asp.net?
How long the items in ViewState exists?
What is web api and why to use it?