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
Name some asp objects?
What are demand-paging and pre-paging?
Explain the different parts that constitute ASP.NET application?
What is meant by server side scripting?
Explain the difference between singleton and single call?
What is data caching?
What is the difference between abstract class vs interface? Can give me the real time examples?
What is the maximum amount of memory any single process on windows can address?
What is the difference between Classic ASP and ASP.Net?
What is server transfer?
What is a web api? Which protocol is used in a web api?
How can we communicate with each server in N-tier Architecture? and what are the methods?
Where code pages are used?
Give an example of what might be best suited to place in the application_start and session_start subroutines?
What symbol specifies the beginning of a query string?