The following questions are intended to reinforce key information presented in this lesson. The questions are also available on the companion CD if you prefer to review them in electronic form.
Answers to these questions and explanations of why each choice is correct or incorrect are located in the "Answers" section at the end of the book.
1. When would you typically use an Input parameter? (Choose all that apply.)
A. When the parameter value is created based on user input
B. When the parameter is used to send data from the application to the database
C. When the command is set to execute a statement with a Where clause
D. When the parameter value is passed to an Insert statement
2. Where are the three primary kinds of parameters?
A. Input, Integer, String
B. Integer, String, DateTime
C. int, varchar, nvarchar
D. Input, Output, InputOutput
3. How do you determine the actual SQL datatype of a SqlParameter (the type expected by the SQL Server)?
A. It is the .NET Framework data type in your application that the parameter represents.
B. It is the type of column or data in SQL Server that the command expects.
C. It is the type of column in a DataTable that it represents.
D. It is any type defined in the SqlDbDataType enumeration.
Was this article helpful?