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
How dataadapter.fill works?
What is the viewstate in asp.net?
What is the benefit of WebAPI over WCF?
How can we call webservices in Banking Applications? and where we are using it?
Can we create a multiple user simultaneously ?
What are html helpers in asp.net?
How do u deploy ur project?
Where do the cookie state and session state information be stored?
What is dynamic web page with example?
How many types of cache are there?
Whats the difference between abstract factory pattern and factory pattern?
Why SessionID changes in every request in asp.net?
Define cookie.
How to Separate background image and front image from original picture....
Define caching.