Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Cơ sở dữ liệu
Microsoft SQL Server 2005 Developer’s Guide- P6
Đang chuẩn bị liên kết để tải về tài liệu:
Microsoft SQL Server 2005 Developer’s Guide- P6
Phước Thiện
45
20
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Microsoft SQL Server 2005 Developer’s Guide- P6:This book is the successor to the SQL Server 2000 Developer’s Guide, which was extremely successful thanks to all of the supportive SQL Server developers who bought that edition of the book. Our first thanks go to all of the people who encouraged us to write another book about Microsoft’s incredible new relational database server: SQL Server 2005. | Chapter 3 Developing CLR Database Objects 99 User-Defined Types Another important new feature in SQL Server 2005 that is enabled by the integration of the .NET CLR is the ability to create true user-defined types UDTs . Using UDTs you can extend the raw types provided by SQL Server and add data types that are specialized to your application or environment. In the following example you ll see how to create a UDT that represents a gender code either M for male or F for female. While you could store this data in a standard one-byte character field using a UDT ensures that the field will accept only these two values with no additional need for triggers constraints or other data validation techniques. To create a UDT using Visual Studio 2005 select the New Project option give your project a name and click OK to create the project. For this project I used the name of Gender for the new UDT. After naming the project and clicking OK I filled out the New Database Reference dialog using the required connection values to deploy the project to the appropriate SQL Server system and database. Next I used the Project Add User-Defined Type option to display the Add New Item dialog that you can see in Figure 3-11. Figure 3-11 Creating a .NET SQL Server UDT 100 Microsoft SQL Server 2005 Developer s Guide Method Description IsNull This required method is used to indicate if the object is nullable. SQL Server 2005 requires all UDTs to implement nullability so this method must always return true. Parse This required method accepts a string parameter and stores it as a UDT. ToString This required method converts the contents of the UDT to a string. Default constructor This required method creates a new instance of the UDT. Table 3-1 Required UDT Methods Select User-Defined Type from the list of SQL Server templates. Enter the name that you want to assign to the class and then click Open to have Visual Studio generate a starter project file for the UDT. The starter project file .
TÀI LIỆU LIÊN QUAN
Administering and Automating Microsoft SQL Server 2005 Databases and Servers
Bài giảng Thực tập chuyên ngành (SQL Server) - Trường Đại học Hàng Hải Việt Nam
Bài giảng Microsoft SQL server: Chương 1 - Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 1 - GV. Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 2 - GV. Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 3 - GV. Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 4 - GV. Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 5 - GV. Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 6 - GV. Phạm Mạnh Cương
Bài giảng Microsoft SQL Server: Chương 7 - GV. Phạm Mạnh Cương
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.