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



Below is a code extract from an ASP.Net application. The code basically reads data from the “name..

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

Below is a code extract from an ASP.Net application. The code basically reads data from the “name..

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

Below is a code extract from an ASP.Net application. The code basically reads data from the “name..

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

Below is a code extract from an ASP.Net application. The code basically reads data from the “name..

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

Post New Answer

More ASP.NET Interview Questions

What is the lifespan for items stored in ViewState?

2 Answers   ISST,


Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?

0 Answers  


How to handle error while project running on live

2 Answers  


when using windows API in .net then it is managed code or Unmanaged code?

2 Answers  


.Net Doesn't offer Deterministic Distruction ? a) True b) False

4 Answers   CTS,






What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

3 Answers   Satyam,


what is mean by framework?

3 Answers  


What is Hidden Fields in Asp.Net

4 Answers  


If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?

7 Answers   Syntax Softtech,


Can more than one person use the same login?

0 Answers   MCN Solutions,


What is asp.net and its advantages?

0 Answers  


What do you mean by serialize and marshalbyref?

0 Answers  


Categories