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
When cookie will expire?
What is http protocol and how it works?
What websites use asp.net?
What language is asp.net written in?
What is application in asp net?
When maintaining session through sql server, what is the impact of read and write operation on session objects?
What are server objects?
What is the flow of processing of the request? : asp.net mvc
How do you open a page in a new window?
What is a postback url?
what are the web form events available in asp.net?
Why do I get error message "could not load type" whenever I browse to my asp.net web site?
What is difference between session and cookies in asp net?
5. What three Specific Job Positions do you target from Swatz Oils GROUP U.K?
Explain Optimization technique description?