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 is server side routing?
Is a dll file an executable?
Define static function?
How u refer webservices?
Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?
What is custom events?
What asp.net control can embed xaml into asp.net pages?
How can you debug your.net application?
Which two new properties are added in asp.net 4.0 page class?
Define msil.
How many types of cookies are available in asp?
Write a code snippet to implement the indentation in json in web api.
What is form submit?
How to find out what version of asp.net I am using on my machine?
What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc