TAILIEUCHUNG - Using the Data Link Properties Dialog Box

[ Team LiB ] Recipe Using the Data Link Properties Dialog Box Problem You want to display the Data Link Properties dialog box from an application so that users can create their own database connections just as they can from the Server Explorer window in the Visual Studio .NET IDE. | Team LiB Recipe Using the Data Link Properties Dialog Box Problem You want to display the Data Link Properties dialog box from an application so that users can create their own database connections just as they can from the Server Explorer window in the Visual Studio .NET IDE. Solution Use COM interop with the OLE DB Service Component to display the Data Link Properties dialog box. You ll need a reference to the Primary Interop Assembly PIA for ADO provided in the file select adodb from the .NET tab in Visual Studio .NET s Add Reference Dialog. You ll also need a reference to the Microsoft OLE DB Service Component Type Library from the COM tab in Visual Studio .NET s Add Reference Dialog. The sample code contains a single event handler Data Link Dialog Creates and displays a Data Link Properties dialog box using the Microsoft OLE DB Service Component through COM interop. The C code is shown in Example 1-10. Example 1-10. File Namespaces variables and constants using System . . . private void dataLinkDialogButton_Click object sender e conn new object oConn object conn dlg new ref oConn Discussion COM interop can open a Data Link Properties dialog box allowing a user to select an OLE DB provider and set its properties. You can use the results programmatically to construct the connection string for an connection object at runtime with a GUI graphical user interface . Team LiB

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.