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 sdlc process?

0 Answers  


What is role-based security?

1 Answers  


What are the modes of updation in an updatepanel? What are triggers of an updatepanel?

0 Answers  


How connect data into DropDownList from Aceess Table?

1 Answers   HCL, TCS,


What is ISAPI?

2 Answers   IBM,






What is the maximum length of textbox

1 Answers  


what is abstract class and method..

2 Answers  


How do you handle unhandled exceptions in ASP.NET?.

3 Answers  


Define WCF ABC , Diffrent Contract. Diff b/w Wcf and in webservice

2 Answers   Syntel,


What are the new navigation controls in asp.net 2.0?

0 Answers  


How to implement caching?

2 Answers   Infosys, Microsoft,


To wrap up a call to a Web service the standard used is..?

0 Answers   Siebel,


Categories