Connecting to an Oracle Database

Connecting to an Oracle Database Problem You want to connect to an Oracle database. Solution You can connect to an Oracle database using either the Oracle .NET data provider or the OLE DB .NET data provider. The sample code contains two event handlers | Team LiB Recipe Connecting to an Oracle Database Problem You want to connect to an Oracle database. Solution You can connect to an Oracle database using either the Oracle .NET data provider or the OLE DB .NET data provider. The sample code contains two event handlers Oracle Creates and opens a connection to an Oracle database using the Oracle .NET data provider. Information about the database is displayed from the properties of the OracleConnection object. OLE DB Creates and opens a connection to an Oracle database using the OLE DB .NET data provider. Information about the database is displayed from the properties of the OleDbConnection object. The C code is shown in Example 1-7. Example 1-7. File Namespaces variables and constants using System using using using . . . private void oracleProviderButton_Click object sender e Connect to Oracle using Microsoft Oracle .NET data provider. OracleConnection conn new OracleConnection Oracle_Scott_ConnectString Connection with ORACLE Provider try ConnectionState DataSource ServerVersion catch OracleException ex ERROR finally ConnectionState private void oleDbButton_Click object sender e Connect to Oracle using OLE DB .NET data provider. OleDbConnection conn new OleDbConnection Settings OleDb_Oracle_ConnectString Connection with OLE DB Provider try ConnectionState DataSource ServerVersion catch OleDbException

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
12    26    1    30-11-2024
Đã 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.