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 types of authentication in asp.net?
What are the advantages of using session?
What is the Intermittent crashing of application in production?
What are session state modes? List some of the important session state modes of asp.net.
Explain model, view and controller represent in an mvc application? : asp.net mvc
Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
What is the parent class of all web server control?
What is difference between datalist and gridview?
Can a master page have more than one contentplaceholder?
How do active server pages work?
How many types of file extensions for razor views in ASP.Net MVC?
Describe the disadvantage of cookies.
Explain an object, class and method.
Differentiate between client-side and server-side validations in web pages.