Get the App
SLTechnology News&Howtos  ›  Database  › 

DotConnect for Oracle getting started Guide (5): retrieving and modifying data

Shulou Source: shulou.com Published: 2022-06-01 16:19:11 09月30日 Update

[download the latest version of dotConnect for Oracle]

DotConnect for Oracle (formerly known as OraDirect.NET) is based on ADO.NET technology and provides a complete solution for applications based on Oracle database. It brings a new method for designing the application structure, improves the work efficiency, and makes the development of the database application easier.

Retrieve and modify data

Introduction

Request

General information

Retrieve and update data using connected models

Retrieve and update data using a disconnected model

Additional information

Introduction

This tutorial describes how to use OracleCommand, OracleDataReader, and OracleDataTable components.

Request

This tutorial assumes that you know how to connect to the server, how to create the necessary objects on the server, and how to insert data into the created table.

Note that if you do not use design time (especially if you do not place it on a designer or OracleConnection component from the toolbox), you must manually embed license information.

General information

As we know, the original function of any database application is to establish a connection to the data source and process the data contained in it. ADO.NET 's .NET Framework data provider acts as a bridge between the application and the data source, allowing you to execute commands and retrieve data using DataReader or DataAdapter. Updating data involves using commands and data adapter objects; it may also involve using transactions.

Let's make some classifications to better understand the ADO.NET model. There are two ways to use data: connected and disconnected models. You can use the classes of the connection model to establish connections and set transactions, get data, and update data sources. These classes interact directly with the database: oracleProviderFactory, oracleConnection, oracleTransaction, oracleDataAdapter, oracleCommand, oracleParameter, and oracleDataReader.

These objects represent disconnected models of ADO.NET and do not immediately interoperate with data sources. These classes provide the ability to process data stores offline: datasets, data tables, data columns, data rows, constraints, data relationships, data views, and data row views.

We will use the classes in the two models in the example.

The goal of this tutorial is to retrieve and update data from table dept (the appropriate DDL/DML script is located in\ Program Files\ Devart\ dotConnect\ Oracle\ Samples\ tables.sql-- the default path for dotConnect for Oracle).

Retrieve and update data using connected models

In this example, we use OracleCommand and OracleDataReader to retrieve and manipulate data.

one

Tags: Data model retrieval program update application application information database data source object tutorial design transaction command method server example component view Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information Redmi Xiaomi OPPO Reno