TAILIEUCHUNG - Microsoft SQL Server 2005 Developer’s Guide- P15

Microsoft SQL Server 2005 Developer’s Guide- P15: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 8 Developing Database Applications with ADO 279 Check object for nothing If cn Then MsgBox No connection information has been entered End Else End If dl Nothing End Sub In the beginning of this listing you can see where an instance of an existing ADO Connection object is passed into the subroutine as a parameter. This ADO Connection object is set to an instance of the Connection object that will be returned by the Data Link object. The following Dim statement then creates a new instance of the DataLinks object named dl. After the dl DataLinks object has been instantiated you can then use the Data Link object s PromptNew method to display the Data Link dialog box as shown in Figure 8-9. Figure 8-9 Selecting the OLE DB Provider using the Data Link dialog box 280 Microsoft SQL Server 2005 Developer s Guide Figure 8-10 Providing the OLE DB Connection information on the Data Link dialog box When the PromptNew method is executed the Data Link dialog box initially displays the Provider tab that lists all the OLE DB providers that are installed on the system. The Data Link dialog box lets you both configure and connect to a target data source. To connect to SQL Server using the Data Link dialog box the user must first select the OLE DB provider to be used from the list of the OLE DB providers displayed on the Provider tab. In Figure 8-9 you can see the OLE DB Provider for SQL Server has been selected. Clicking the Next button or selecting the Connection tab displays the OLE DB Connection information dialog box as shown in Figure 8-10. The Connection tab lets the user select the name of the SQL Server system that will be connected to as well as enter authentication information and specify a default database. In Figure 8-10 you can see the Data Link dialog box is being used to connect to a system named teca-sql2005 that Integrated Security will be used and AdventureWorks will be set as the default database. When all the connection information has .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.