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 / wriju b
dbcomm = New OleDbCommand("SELECT name FROM members",
conn_str)
dbread = dbcomm.ExecuteReader()
while(dbread.Read())
response.write(dbread.GetString(1)))
dbread.NextResult()
dbread.Close()
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What are the differences between code behind and code inline?
Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?
What is a viewbag?
Why mvc is faster than asp.net? : Asp.Net MVC
Can a .net web application consume java web service?
When you are running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?
What do you mean by query string?
What is the use of session state and application state and difference between them?
is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?
Explain about secure socket layer?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
How does exception management works in ASP.NET?
Why we use asp.net for website development?
Explain server-side scripting and client-side scripting.