본문 바로가기

우편번호검색4

Lecture 33 - JSP(2) 우편번호검색, DatabaseMetadata, Callable SearchZipcode 동이름(2글자 이상의 부분) 입력받아서 => 우편번호 리스트 출력 select ~ from zipcode where dong like '입력%' import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Scanner; public class SearchZipcode { public static void main(String[] args) { // 입력 한번만 // 1자 이하로 입력 에러 ... // 동만 ... 리 포함해서 검색 Scanner scan =.. 2023. 6. 20.
Lecture 32 - JSP(1) JDBC API 사용법(Java와 SQL 연동) Managed Language - 자바, C#, python Unmanaged Language - C, C++, asm managed의 뜻은 메모리 관리를 자동으로 하냐 직접 해주냐임 두 영역별 언어 1개씩은 할 줄 아는게 중요 JDBC JDBC 드라이버 가져오는 법 JDBC URL, 드라이브로딩, 커넥션 DML 처리 JDBCEx01 - 드라이버 로딩 법 public class JDBCEx01 { public static void main(String[] args) { // 드라이버 - 라이브러리 내의 클래스 try { Class.forName("oracle.jdbc.driver.OracleDriver"); System.out.println("드라이버 로딩 성공"); } catch (ClassNotFou.. 2023. 6. 20.
Lecture 88 - Python(8) 파이썬을 이용한 우편번호 검색기, nCloud에 python 3 설치 파이선을 활용한 우편번호 검색기 - 강사님 Version ZipSearch.migrationEx01 file = open('zipcode_seoul_utf8_type2.csv', 'r', encoding='utf8') line = file.readline() while line: lines = line.split(',') # statement처럼 print("insert into zipcode values(%s, '%s', '%s', '%s', '%s', '%s', '%s')" %\ (lines[6], lines[0], lines[1], lines[2], lines[3], lines[4], lines[5])) line = file.readline() file.close() ncloud mariadb에서 .. 2019. 8. 1.
Lecture 60 - JSP(18) JSTL, 우편번호검색 JSTLEx01.WebContent.gugudan X ${ col } ${ row }단 ${ row } x ${ col } = ${ row * col } JstlEx01.WebContent.jstlEx07 - forEach 태그 JstlEx01.WebContent.jstlEx08 url 1 = ${ url1 } url 1 = ${ url1 } url 2 = ${ url2 } JstlEx01.WebContent.jstlEx09 ${ url } JstlEx01.WebContent.jstlEx10 데이터 보이기 : ${ data } 데이터 보이기 : ${ data2 } JSTLEx02.WebContent.jstlEx01 SQL> select * from dept2; select * from dept2 * 1행.. 2019. 6. 12.