IMPLEMENTING LDIM case 2 : units = ft ; break; case 3 : units = yd ; break; } } Read starts by just skipping over the part of the stream that is used for sorting. Next it reads in the value of the value field. Lastly it reads the token for the unitsfield and fills it accordingly. User-Defined Type Properties and Fields Public fields and properties in the class that implements a user-defined type are exposed in SQL Server. The fields and properties are exposed by name. A variable or column can access a public field or property of a user- defined type by adding a suffix that consists of a . followed by the name of the field or property. The field or property can then be referenced in the same way as any other variable or column. Listing 5-15 shows this syntax in a SQL batch. Listing 5-15: Field/Property Access Syntax DECLARE @L as Longitude SET @L = CONVERT(Longitude, 50 3 32 W ) PRINT @L.degrees 50 PRINT @L.minutes 3 PRINT @L.seconds 32 PRINT @L.direction W SET @L.direction= E Longitudeis a user-defined type that has degrees, minutes, seconds, and direction as public fields in its implementation. The SQL batch in Listing 5-15 prints each of these fields and then changes the direction to E . Listing 5-16 shows a modified implementation of LDim that makes unitsa public field.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services