DotConnect for Oracle getting started Guide (4): inserting data into tables
[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.
This tutorial shows you how to use the OracleCommand component to insert data into a table by executing an SQL query.
In this tutorial:
Request
General information
Insert data at run time
Design time Settin
Use DBForge Fusion for Oracle
Additional information
Request
This tutorial assumes that you know how to connect to the server (the tutorial logs in to the server) and that you have created the necessary objects on the server (the tutorial creates database objects).
Note that if you do not use design time (especially if you do not place it on a Designer OracleConnection component from the toolbox), you must manually embed license information.
General information
Data on the server can be modified (inserted, changed, or deleted) using the data manipulation language (DML), and DML is part of SQL. DML statements can be executed on the server by an account with the necessary privileges.
There are two ways to manipulate the database. You can build DML statements manually and run them in some components, such as oraclecommand. Another way is to use design-time features that provide a graphical user interface to manage the database. We will discuss two ways.
The goal of this tutorial is to insert the following data into the DEPT and EMP tables:
DEPT table:
EMP table:
Insert data at run time
To insert the first row into the table DEPT, you can use the following statement:
INSERT INTO dept (deptno, dname, loc) VALUES
The following code snippet executes the query:
one