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 / chauhan rakesh botad
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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between viewstate and hidden field in asp.net?
Explain method to handle error using HttpError in Web API?
Explain client-side scripting?
How to store checkbox value in database in asp.net mvc? : Asp.Net MVC
Why is global asax is used?
What is a form tag?
Explain the server control events of asp.net ?
What is the main differences between asp and asp.net?
What are the differences between application object and session object?
Are xaml file compiled or built on runtime?
What are the versions of garbage collection?
Why is mvc better than asp.net?
What is the difference between system.stringbuilder and system.string
What is a session government?
Explain the asp.net mvc folder conventions? : asp.net mvc