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 difference between view state and session state?
What websites use asp.net?
What describes a query?
What is asynchronous call?
What is manifest in .net framework?
What is the web.config file in asp?
What is the use of express session?
Contrast OOP and SOA. What are tenets of each ?
Is it true that a Web service must be written in .NET or not?
Explain the disadvantages of viewstate?
Where the viewstate is stored after the page postback?
Mention the namespace that is used to include .net data provider for sql server in .net code?
What is the usie of activex control in .net?
Explain asp.net web forms.
I’m having some trouble with cas. How can I diagnose my problem?