PrepAway - Latest Free Exam Questions & Answers

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 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?

PrepAway - Latest Free Exam Questions & Answers

A.
Set the parameter’s SqlDbType to Binary.

B.
Set the parameter’s SqlDbType to Variant.

C.
Set the parameter’s SqlDbType to Udt. Set the parameter’s UdtTypeName to GEOMETRY.

D.
Set the parameter’s SqlDbType to Structured. Set the parameter’s TypeName to GEOMETRY.

Explanation:
There are two types of spatial data. The geometry data type supports planar, or Euclidean (flat-earth), 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)


Leave a Reply