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
Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?
Explain the concept of View Model in MVC?
Suppose You Want A Certain Asp.net Function Executed On Mouseover For A Certain Button. Where Do You Add An Event Handler?
Define web services in asp.net.
Explain how cookies work. Give an example of cookie abuse.
Can we use MSSql as backend in asp.net...if yes then How.?
What are the two types of web pages?
What is session authentication?
What is distributed system in asp.net?
What is the life cycle of an asp.net page?
How to Separate background image and front image from original picture....
Can you explain how ASP.NET application life cycle and page life cycle events fire?
How can we create pie chart in asp.net?
Is post back property in asp net?
Why SessionID changes in every request in asp.net?