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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is paging in context of Memory?

751


In which event of page cycle is the viewstate available?

675


Define xmlvalidatingreader class.

647


Which is better viewstate or session?

602


Write a code for sending an email from asp.net application.

640






What are the asp.net server side objects?

605


How to add DateTime Control in normal DataGrid Server Control?

689


Can you use Web API with ASP.NET Web Form?

764


Is asp.net a programming language or framework?

659


what are the ihttphandler and ihttphandlerfactory interfaces ?

614


Diff between web user control and web custom control?

604


How will you do Redo and Undo in a TextControl?

753


what is a .xap file? Explain with an example.

674


Explain what does wsdl stand for?

641


How to find last error which occurred?

624