PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the application calls a stored procedure that accepts a table-valued parameter

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server 2008 database. You need to ensure that the
application calls a stored procedure that accepts a table-valued parameter. You create a
SqlParameter object. What should you do next?

PrepAway - Latest Free Exam Questions & Answers

A.
Set the SqIDbType of SqlParameter to Udt.

B.
Set the SqIDbType of SqlParameter to Structured. Set the TypeName of SqlParameter to the type
name of the table-valued parameter.

C.
Set the ParometerDirection of SqlParameter to Output.

D.
Set the SqIDbType of SqlParameter to Variant.

Explanation:
SqlParameter.DbType Gets or sets the SqlDbType of the parameter.
SqlParameter.TypeName Gets or sets the type name for a table-valued parameter.
SqlDbType.Structured A special data type for specifying structured data contained in table-valued
parameters.
Udt A SQL Server 2005 user-defined type (UDT).
Spatial types
(http://msdn.microsoft.com/en-us/library/ff848797.aspx)
Types of Spatial Data
(http://msdn.microsoft.com/en-us/library/bb964711.aspx)


Leave a Reply