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
What is a viewstate?
How many types of state management are there in asp net?
Explain Features in ASP.NET
Explain the difference between Web Garden and Web Farm?
What is asp.net with mvc? : Asp.Net MVC
What is cookies cache and session?
Explain serialization and deserialization?
What is query string in asp.net?
What are the Types of state management techniques
What is http pipeline in asp.net?
Explain how does asp page work?
how can create login from create and written conde in asp.net
What is rending process in ASP.NET?
Explain the difference between debug.write and trace.write? When should each be used?
Which method is used to perform all validation at the page level?