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
Is it possible to change the index of primary key on table?
What is the difference between dispose() and finalize()?
What are the advantages of asp.net mvc framework? : asp.net mvc
What is is post back property in asp net?
How do I use a proxy server when invoking a web service?
What is data grid view in asp.net?
What is the significance of proxy user?
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
Explain about consistent programming model in the .NET framework?
Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?
What is webresource axd?
Which tool you have done?
What are the different methods of session maintenance in asp.net?
What is the asp.net control toolkit?
what is a .xap file? Explain with an example.