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 / chauhan rakesh botad
dbcomm = New OleDbCommand("SELECT name FROM members",
conn_str)
dbread = dbcomm.ExecuteReader()
while(dbread.Read())
response.write(dbread.GetString(1)))
dbread.NextResult()
dbread.Close(
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why and where this web.config file is used?
What is variable and constant in .net programming language?
What are the cookies types in asp.net?
How does session authentication work?
How do you create a master page?
How can you handle unmanaged code exceptions in asp.net?
What is custom attribute?
What is bound controls
Briefly describe the role of global.asax?
Describe the diffeerence between inline and code behind?
What is the biggest disadvantage of “Other Return Types” in Web API?
Explain how is a property designated as read-only?
What are the advantages of the code-behind feature?
What is a postback url?
Why session is used in asp.net?