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 are cookies in your browser?
I’m having some trouble with cas. How can I diagnose my problem?
What is the difference between sealed vs static class?
What is asp.net used for?
Name the tools or API for developing or testing web api?
Demonstrate Render and PreRender?
Which method is used to perform all validation at the page level?
What websites use asp.net?
What are directives in asp.net?
To display data in a Repeater control which template you provide?
Why would a company use an application service provider?
What is http post and http get?
What types of data validation events are commonly seen in the client-side form validation?
How to do parallel database export in remote SQL Server in ESSL time track. It is working for local server but not working for remote SQL Server
How to add DateTime Control in normal DataGrid Server Control?