Data Access  «Prev  Next»

Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. Parameterized queries
Please select the best answer.
  A. Are Design-Time Controls that are executed when the Web page is loaded
  B. Use placeholders to insert user-entered values at runtime
  C. Are only available for Microsoft Access
  D. Bind data to Design-Time Controls

2. In a modern ADO.NET application, how do you change which rows a query retrieves based on a value that's only known once the page is actually running, like a visitor's search term?
Please select the best answer.
  A. By changing the SqlCommand's properties in a design-time Properties window
  B. By editing the stored procedure's definition on the server each time a new value is needed
  C. By setting a parameter's value on the SqlCommand in C# code before the command executes
  D. By rewriting the connection string

3. Which legacy Visual InterDev Design-Time Control was used primarily to interface to and manipulate data?
Please select the best answer.
  A. Grid
  B. RecordsetNavBar
  C. TextBox
  D. Recordset

4. In Visual InterDev, a Recordset Design-Time Control was configured at design time by
Please select the best answer.
  A. Adding a Data Environment
  B. Assigning the control a reference to a database
  C. Adding a command object
  D. Setting various control properties

5. A Razor Page builds a visitor's search term directly into a SQL string instead of passing it as a parameter. What risk does this create?
Please select the best answer.
  A. The visitor could submit SQL that changes what the statement actually does, a SQL injection vulnerability
  B. The query would run noticeably slower every time
  C. SQL Server would reject the statement outright
  D. The search would only ever match whole words, never partial text