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
what is command line compiler.what are the steps and how it is related to debugging.
What is an assembly? Explain its parts.
Explain asp.net web forms.
What do you understand from custom control?
What is in a session cookie?
What is asp.net web application?
What are sessions in asp net?
What is the significance of finalize method in .net?
What is http only cookie?
List the major built-in objects in asp.net?
What are the major built-in objects in ASP.NET?
How to rename a table using sql queries?
if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.
In how many ways we can retrieve table records count?
What are the components of ado.net?