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 / karna
dbcomm = New OleDbCommand("SELECT name FROM members",
conn_str)
dbread = dbcomm.ExecuteReader();
while(dbread.Read())
{
response.write(dbread("name"))
}
dbread.Close()
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Explain weak typing and strong typing.
what is loosely coupled solution? How it can be used?
In the Repeater control which way you can edit?
How many types of session state management options available in asp.net?
What is loop in asp.net?
What do you mean by serialize and marshalbyref?
How will you load dynamic assembly? How will create assesblies at run time?
what is DLL Hell and how it is solved in .NET? please explain clearly??
Difference between singleton and singlecall.
State differences between MVC and WebAPI
How to display validation messages in one control?
How do sessions work?
Explain what is viewstate?
Apart from IDE what are the enhancements in asp.net 2.0?
Name the tools or API for developing or testing web api?