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 / wriju b
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 ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the file through which you can customize your asp.net application?
Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?
What is request and response in asp.net?
Explain about the .NET framework?
Who is using asp.net?
Web API uses which library for JSON serialization?
Can you dynamically assign a Master Page?
How to find last error which occurred in Asp.net ?
What is IPostBack? How to use it?
How many types of validation are there?
Explain the path instructions in xaml?
What are the differences between application object and session object?
How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.
What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
What are resource file and how do we generate resource file?