SQL Server Data Access Components | support@devart.com
UDT Demo Readme |

This demo project demonstrates SDAC abilities for working with CLR User-defined Types (UDT) of SQL Server 2005. You can read about UDT in MSDN.

It is required some additional settings to be made for this demo:

1. The Square.sln from the Square folder should be built with Microsoft Visual Studio. This step can be omitted, as the built assembly is included in the demo.
2. Register the Square.dll assembly implementing UDT in your SQL Server by the following Transact-SQL command:

             CREATE ASSEMBLY Square
             FROM '< Path to the assembly on the SQL Server computer >\Square.dll'
             WITH PERMISSION_SET = SAFE;

3. Create a new type from this assembly:

             CREATE TYPE dbo.Square EXTERNAL NAME Square.[Square];

4. Create and fill the table used in the demo:

             CREATE TABLE Squares(
               [uid] [int] IDENTITY (1, 1) NOT NULL ,
               c_square    Square)

             GO

             ALTER TABLE [dbo].[Squares] WITH NOCHECK ADD
               CONSTRAINT [PK_Squares] PRIMARY KEY  CLUSTERED
               (
                 [uid]
               )  ON [PRIMARY]

             GO

             INSERT INTO [Squares](c_square) VALUES(CONVERT(Square, '0, 0, 100'))
             INSERT INTO [Squares](c_square) VALUES(CONVERT(Square, '100, 100, 150'))
             INSERT INTO [Squares](c_square) VALUES(CONVERT(Square, '100, 200, 200'))
             INSERT INTO [Squares](c_square) VALUES(CONVERT(Square, '200, 100, 250'))
             INSERT INTO [Squares](c_square) VALUES(CONVERT(Square, '200, 150, 300'))

5. Put the Square.dll assembly in the root folder of the demo directory, or register it in GAC.

This demo requires:

1. Microsoft SQL Server 2005;
2. SQL Native Client provider on the client computer;
3. .Net framework version 2 on the client computer.

© 1997-2025 Devart. All rights reserved.