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 use a spatial value type
as a parameter for your database query. What should you do?
A.
Set the parameters SqlDbType to Udt. Set the parameters UdtTypeName to GEOMETRY.
B.
Set the parameters SqlDbType to Binary.
C.
Set the parameters SqlDbType to Variant.
D.
Set the parameters SqlDbType to Structured. Set the parameters TypeName to GEOMETRY.
Explanation:
There are two types of spatial data. The geometry data type supports planar, or Euclidean (flatearth), data.
The geometry data type conforms to the Open Geospatial Consortium (OGC) Simple Features for SQL
Specification version 1.1.0.
In addition, SQL Server supports the geography data type, which stores ellipsoidal (round-earth)
data, such as GPS latitude and longitude coordinates.
SqlParameter.UdtTypeName Gets or sets a string that represents a user-defined type as a
parameter.
CHAPTER 2 ADO.NET Connected Classes
Lesson 2: Reading and Writing Data
Working with SQL Server User-Defined Types (UDTs) (page 105)
Spatial types
(http://msdn.microsoft.com/en-us/library/ff848797.aspx)
Types of Spatial Data
(http://msdn.microsoft.com/en-us/library/bb964711.aspx)