[OracleConnection]
oracleConnection1부분 설정
this.oracleConnection1.ConnectionString = "~~~~~~";
this.oracleConnection1.Credential = null;
this.oracleConnection1.PDBNanme = "xepdb1";
this.oracleConnection1.ServiceName = "xepdb1";
connectionString의 물결부분에 넣어주어야 할 코드
1. with tnsnames.ora
DATA SOURCE = XEPDB1;
USER ID = daye; PASSWORD = 1234;
2. without tnsnames.ora
DATA SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL=TCP)(HOST=IP)(PORT=1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XEPDB1)
)
)
USER ID = daye;
PASSWORD = 1234;
[OracleCommand]
this.oracleCommand1.CommandText = "쿼리문";
this.oracleCommand1.Connection = this.oracleConnection1;
this.oracleCommand1.Transaction = null;
command 객체의 메소드
ExecuteReader - SELECT로 결과는 Bag반환...
ExecuteNonQuery - INSERT, DELETE, UPDATE
ExecuteScalar - 단일값 반환
'PROGRAMMING CODE > ORACLE&DB' 카테고리의 다른 글
[Oracle] ADO.NET (0) | 2021.10.19 |
---|---|
[Oracle] 오라클 일반 관리자 추가, 권한 롤 (0) | 2021.10.19 |
[Oracle] Multi-tenant, CDB, PDB, sys, system (0) | 2021.10.19 |
[Oracle] SQL로 간단한 검색 (0) | 2021.10.19 |
[Oracle] 학생과 교수관계 테이블생성,데이터추가 (0) | 2021.10.19 |