![Phân tích tư tưởng của nhân dân qua đoạn thơ: Những người vợ nhớ chồng… Những cuộc đời đã hóa sông núi ta trong Đất nước của Nguyễn Khoa Điềm](https://timtailieu.net/upload/document/136415/phan-tich-tu-tuong-cua-nhan-dan-qua-doan-tho-039-039-nhung-nguoi-vo-nho-chong-nhung-cuoc-doi-da-hoa-song-nui-ta-039-039-trong-dat-nuoc-cua-nguyen-khoa-136415.jpg)
Listing Installed ODBC Drivers
Số trang: 2
Loại file: pdf
Dung lượng: 11.19 KB
Lượt xem: 5
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
[ Team LiB ] Recipe 10.16 Listing Installed ODBC Drivers Problem You need a list of the ODBC drivers installed on the computer running your code. Solution Consult the registry. The sample code uses the Microsoft.Win32.
Nội dung trích xuất từ tài liệu:
Listing Installed ODBC Drivers [ Team LiB ]Recipe 10.16 Listing Installed ODBC DriversProblemYou need a list of the ODBC drivers installed on the computer running your code.SolutionConsult the registry.The sample code uses the Microsoft.Win32.Registry class to display a list of all installedODBC drivers.The C# code is shown in Example 10-17.Example 10-17. File: OdbcDriversForm.cs// Namespaces, variables, and constantsusing System;using System.Text;using Microsoft.Win32;// . . .StringBuilder result = new StringBuilder( );// Get the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBCDrivers key.RegistryKey keyLocalMachine =Registry.LocalMachine.OpenSubKey(@SOFTWARE\ODBC\ODBCINST.INI\ODBCDrivers, false);string[] valueNames = keyLocalMachine.GetValueNames( );for(int i = 0; i < valueNames.Length; i++) result.Append(valueNames[i] + Environment.NewLine);resultTextBox.Text = result.ToString( );DiscussionThe .NET Framework classes that manipulate the registry are found in theMicrosoft.Win32 namespace. The registry keyHKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Driverscontains a value name for each installed ODBC driver.[ Team LiB ]
Nội dung trích xuất từ tài liệu:
Listing Installed ODBC Drivers [ Team LiB ]Recipe 10.16 Listing Installed ODBC DriversProblemYou need a list of the ODBC drivers installed on the computer running your code.SolutionConsult the registry.The sample code uses the Microsoft.Win32.Registry class to display a list of all installedODBC drivers.The C# code is shown in Example 10-17.Example 10-17. File: OdbcDriversForm.cs// Namespaces, variables, and constantsusing System;using System.Text;using Microsoft.Win32;// . . .StringBuilder result = new StringBuilder( );// Get the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBCDrivers key.RegistryKey keyLocalMachine =Registry.LocalMachine.OpenSubKey(@SOFTWARE\ODBC\ODBCINST.INI\ODBCDrivers, false);string[] valueNames = keyLocalMachine.GetValueNames( );for(int i = 0; i < valueNames.Length; i++) result.Append(valueNames[i] + Environment.NewLine);resultTextBox.Text = result.ToString( );DiscussionThe .NET Framework classes that manipulate the registry are found in theMicrosoft.Win32 namespace. The registry keyHKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Driverscontains a value name for each installed ODBC driver.[ Team LiB ]
Tìm kiếm theo từ khóa liên quan:
công nghệ thông tin kỹ thuật lập trình Oreilly Ado Dot Net Cookbook Ebook-Lib Listing Installed ODBC DriversTài liệu liên quan:
-
52 trang 449 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 342 0 0 -
74 trang 320 0 0
-
96 trang 316 0 0
-
Tài liệu dạy học môn Tin học trong chương trình đào tạo trình độ cao đẳng
348 trang 304 1 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 302 0 0 -
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 301 0 0 -
Kỹ thuật lập trình trên Visual Basic 2005
148 trang 290 0 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 288 0 0 -
Tài liệu hướng dẫn sử dụng thư điện tử tài nguyên và môi trường
72 trang 282 0 0