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
What is paging in context of Memory?
In which event of page cycle is the viewstate available?
Define xmlvalidatingreader class.
Which is better viewstate or session?
Write a code for sending an email from asp.net application.
What are the asp.net server side objects?
How to add DateTime Control in normal DataGrid Server Control?
Can you use Web API with ASP.NET Web Form?
Is asp.net a programming language or framework?
what are the ihttphandler and ihttphandlerfactory interfaces ?
Diff between web user control and web custom control?
How will you do Redo and Undo in a TextControl?
what is a .xap file? Explain with an example.
Explain what does wsdl stand for?
How to find last error which occurred?