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
How you can access the properties and controls of master pages from content pages?
Differentiate between a hyperlink control and a linkbutton control.
What is the state management in asp.net?
What is cookies in asp net?
What is the default timeout for a cookie?
How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.
How do cookies work? Give an example of their abuse.
How can you make sure that web api returns json data only?
What are the Types of state management techniques
Web API supports which protocol?
Can you explain one critical mapping? Performance issue which one is better?
What is the use of autowireup in asp.net?
what is a .xap file? Explain with an example.
Difference between response.redirect and server.transfer?
What does clearing cache?