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

List the types of authentication supported by asp.net?

0 Answers  


What is fulltrust?

0 Answers  


Explain the Order of events in an asp.net page?

0 Answers  


How to write unmanaged code and how to identify whether the code is managed / unmanaged ?

2 Answers   Accenture, BirlaSoft, Cogtest,


If we write return statement in finally block will it works fine or throws any error?

1 Answers   Patni,






What are ASHX files?

0 Answers   HCL,


in database table is thier . in that table fields are photoid , photoname,photo... i want display image in the gridview

5 Answers   TCS,


page life cycle of asp.net.

4 Answers  


What is a postback url?

0 Answers  


Descrie about response.buffer and repsonse.flush ?

2 Answers   ADP, Cognizant,


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()

4 Answers   Techno Solutions,


What is the most appropriate lifetime for a database connection/orm context in an asp.net mvc application? : Asp.Net MVC

0 Answers  


Categories