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 the difference between application state and session state in asp net?
What is autopostback in dropdownlist in asp net?
Is redux flux?
What is the Intermittent crashing of application in production?
What are the elements of a website?
What is a session in asp.net?
Can we use MSSql as backend in asp.net...if yes then How.?
Can you set the session out time manually?
while developing webservices if i want some users to use my webservice only how can i give security to my webservice?
A Web Service Can Only Be Written In .net. Is it True??
3. What goals do you have in your career?
What does passport and windows authentication mean in ASP.NET?
What are web server controls in asp.net?
What is a viewbag?
What is viewstate in asp net with example?