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 / karna
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 ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is http post action?
How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.
What is the difference between ASP Session State and ASP.Net Session State?
What are HTTP handlers in ASP.NET?
Explain what are delegates?
Where you store Connection string in "Web.Config" file in ASP.NET?
Do you know about caching with the datasource controls?
What is base class of button control in .net?
What is difference between session and application in asp net?
What are the differences between code behind and code inline?
What websites use asp.net?
What are the different session state management options available in asp.net?
For which does this Codebehind="MyCode.aspx.cs" is relevent to ?
Explain About WebService
What is the difference between c# and .net?