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

By default, Web API sends HTTP response with which of the following status code for all uncaught exception?

1 Answers  


any body help me. Is it possible to convert text in gif images into word document with the same text? thanks in advance.

2 Answers  


What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?

1 Answers   HCL,


How do you specify whether your data should be passed as Query string and Forms (Mainly about POST and GET)

2 Answers  


Why will you usually create an aspnet user account in the database for an asp.net web application?

1 Answers  


What events will occur when a page is loaded?

1 Answers  


What is the maximum number of classes that can be contained in one dll file?

1 Answers  


how we use web services

2 Answers  


Where sessions are stored in asp.net?

1 Answers  


Usage of web.configuration ?

3 Answers   Microsoft,


Types of session management in ASP.NET?

1 Answers   Microsoft,


What is a ashx file?

1 Answers  


Categories