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
What are the different method of navigation in asp.net?
Define secured sockets layer.
Explain the asp.net mvc request life cycle? : asp.net mvc
Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?
How will you load dynamic assembly?
What is an example of an application service provider?
How many types of cookies are there in asp.net?
If you have an application with multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers by using round-robbin load balancing. Explain which is the best approach to maintain login-in state for the users?
Explain advantages of caching?
Explain the difference between singleton and single call?
When cookie will expire?
How can we create Tree control in asp.net?
What is asp.net architecture?
Why the javascript validation not run on the asp.net button but run successfully on the html button?
How to manage different kinds of sessions in ASP.NET?