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()
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / 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 |
Answer / chauhan rakesh botad
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 ? | 1 Yes | 0 No |
What is the difference between Postback and Ispostback Property?
7 Answers Atrocity Apps Technologies, DC Infotech, HCL, Maples, Visual Soft,
How can you ensure a permanent cookie?
What is the significance of attaching a profile while creating a user?
What does WSDL stand for?
What a diffgram is, and a good use for one?
Is asp.net 64-bit enabled? How?
Should I delete cookies?
Mention the execution process for managed code?
How do you validate the controls in an ASP .NET page?
How to retrieve user name in case of Window Authentication?
What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
12 Answers Phoenix Technologies,
What is difference b/w Data Grid in ASP.Net 1.1 and Gridview in 2.0