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 / jerry joseph
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 ? | 3 Yes | 1 No |
Post New Answer View All Answers
Can I have a unique key as foreign key?
Can viewstate be accessed in another page?
What is the sequence in which ASP.NET events are processed?
Differentiate between namespace and assembly.
Explain asp.net application life cycle?
Where can I get information on cookies in asp.net?
What are directives in asp.net? List down all the important directives.
What is state management techniques in asp.net?
Explain About duration in caching technique
What is difference between session and viewstate?
What is a web based system?
What symbol would you use to denote, the start of a code block in aspx views?
Can we have multiple master pages in asp net?
1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?
What is difference between asp.net and asp.net mvc? : Asp.Net MVC