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 difference between runtime version and version?
Why we use content place holder in asp.net?
What is application and session in asp.net?
We are using Jscriopt validations and at clint site javascript is not running that time validation would work? if yes then how it would behave?
Mention the namespace that is used to include .net data provider for sql server in .net code?
Define reflection in .net?
What is a session in asp.net?
COM+ Used ________________ Isolation Level
Describe the diffeerence between inline and code behind?
Why do you use the app_code folder in asp.net?
What are the new web part controls in asp.net 2.0 ?
Briefly describe the role of global.asax?
Explain About WebService
Whats the difference between registerclientscriptblock, registerclientscriptinclude and registerclientscriptresource?
What is the maximum number of classes that can be contained in one dll file?