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
How can you use a custom controls in ASP.NET application?
Is asp.net web forms dead?
Is it right that ASP.NET Web API has replaced WCF?
Diff between web user control and web custom control?
What are web beacons used for?
Why is the standalone environment only useful during the development process?
How many web config files can be created for an application?
Explain about Application and Session Events ?
What is a form tag?
What is server infrastructure?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
How Can assign alias name for ASP.NET Web API Action?
Explain the advantages of passport authentication.
What are the merits and demerits of viewstate?
Can asp.net work on an nt server?