(오라클+자바) 데이타베이스에 데이타 변경 하는 프로그램 만들기


We will make a program to edit the database in the oracle with the help of java.



This will be our program templates.

We will gonna make package and class like this.




EmpMain

In the main, we gonna introduce our first sentence in our program.
We use switch ... case () sentence to build our front page of our program.

if you enter 1 -> the prg will activate InsertEmp();
if you enter 2 -> the prg will activate UpdateEmp();
if you enter 3 -> the prg will activate SelectEmp();
if you enter 4 -> the prg will activate DeleteEmp();
if you enter nth -> the prg will go back to the first page of our program.


EmpProcess

This is prg foundation to act as a branch between main and insert/delete/update/select .

 EmpDAO


url is to oracle through IP address.
uid and pwd is for oracle's account name and password, that you have already created.

publuc EmpDAO is the must to write.
pstmt = con.prepareStatement("insert (?,?,?,?,sysdate,?)");

? is for the properties that you write in the oracle's table.






InsertEmp

UpdateEmp

SelectEmp

DeleteEmp


댓글

댓글 쓰기

이 블로그의 인기 게시물

c++ 랜덤 숫자 생성하기 / 컴퓨터 난수 시드 설정

(오라클) View(뷰) + where/order by/like/is/() / in 사용방법 예제

(오라클) Sequence/시퀸스의 활용과 개념