Comtrol ID 레이블 Hotkey Callback 함수 ⑴ Button, IDC_BTN_DEPT, &Department, OnBtnDepartment ⑵ Button, IDC_BTN_EMP, &Employee, OnBtnEmployee ⑶ Button, IDC_B

Size: px
Start display at page:

Download "Comtrol ID 레이블 Hotkey Callback 함수 ⑴ Button, IDC_BTN_DEPT, &Department, OnBtnDepartment ⑵ Button, IDC_BTN_EMP, &Employee, OnBtnEmployee ⑶ Button, IDC_B"

Transcription

1 adb.open(dsn) ;; DB 연결 (CompanyAccDB) adb.open(null, false, false, strdsn) ;; DB 연결 (DSN=CompanyAccDB) adb.executesql(strsql) ;; 결과가없는연산자 (Ins/Del/Upd) adb.close() ;; DB 연결끊음 CRecordset aqryset(&adb) ;; DB에질의결과를저장 aqryset.open(ntype, strsql) ;; 결과가있는연산자 ( 검색 ) aqryset.movefirst,...prev,...next,...last ;; tuple 선택 aqryset.getfieldvalue(nndx, strvalue) ;; 선택된 tuple의값 aqryset.close() ;; 질의마감 Visual C++ MFC MFC 응용프로그램 Name: DatabaseApp 응용프로그램종류 : 대화상자기반 SDL(Security Development Lifecycle) 검사리소스언어 : 영어 ( 미국 ) About Box 대화상자제목 : Company Database Application Class Name: CDatabaseApp 프로젝트가생성되면사용되는문자가자동으로유니코드를사용하게됩니다. 스트링을끝에 NULL을정확하게인식하기위해서는 ASCII 문자로설정해야하는데다음과같다. 솔루션탐색기 DatabaseApp 속성구성 : 모든구성플랫폼 : 모든플랫폼구성속성 일반 문자집합 : 설정안함 ( 오른쪽위의그림참조 ) Resource View DatabaseApp DatabaseApp.rc Dialog IDD_DATABASE_DIALOG

2 Comtrol ID 레이블 Hotkey Callback 함수 ⑴ Button, IDC_BTN_DEPT, &Department, OnBtnDepartment ⑵ Button, IDC_BTN_EMP, &Employee, OnBtnEmployee ⑶ Button, IDC_BTN_PRJCT, &Project, OnBtnProject ⑷ Button, IDC_BTN_WRKSN, &WorksOn, OnBtnWorksOn ⑸ Button, IDC_BTN_DEPTLOC, Dept&Locations, OnBtnDeptLocations ⑹ Button, IDC_BTN_DPNDNT, Depe&ndent, OnBtnDependent ⑺ Button, IDC_BTN_VW1, View &1, OnBtnView1 ⑻ Button, IDC_BTN_VW2, View &2, OnBtnView2 ⑼ Button, IDC_BTN_VW3, View &3, OnBtnView3 ⑽ Button, IDC_BTN_VW4, View &4, OnBtnView4 ⑾ Button, IDOK, Check Mnemonic Tab Order Tap Stop Group [DatabaseApp.rc] &Quit ;; 단축키의중복체크 ;; Control( 버튼 ) 들의순서를지정 ;; Tab 으로 Control 들사이를이동 ;; Control 들의그룹 IDD_DATABASEAPP_DIALOG DIALOGEX 0, 0, 143, 140 STYLE DS_SETFONT DS_FIXEDSYS WS_POPUP WS_VISIBLE WS_CAPTION WS_SYSMENU WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW CAPTION "Company Database Application" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN PUSHBUTTON "&Department",IDC_BTN_DEPT,7,7,64,21,WS_GROUP PUSHBUTTON "&Employee",IDC_BTN_EMP,7,28,64,21,NOT WS_TABSTOP PUSHBUTTON "&Project",IDC_BTN_PRJCT,7,49,64,21,NOT WS_TABSTOP PUSHBUTTON "&WorksOn",IDC_BTN_WRKSN,7,70,64,21,NOT WS_TABSTOP PUSHBUTTON "Dept&Locations",IDC_BTN_DEPTLOC,7,91,64,21,NOT WS_TABSTOP PUSHBUTTON "Depe&ndent",IDC_BTN_DPNDNT,7,112,64,21,NOT WS_TABSTOP PUSHBUTTON "View &1",IDC_BTN_VW1,72,7,64,21,WS_GROUP PUSHBUTTON "View &2",IDC_BTN_VW2,72,28,64,21,NOT WS_TABSTOP PUSHBUTTON "View &3",IDC_BTN_VW3,72,49,64,21,NOT WS_TABSTOP PUSHBUTTON "View &4",IDC_BTN_VW4,72,70,64,21,NOT WS_TABSTOP PUSHBUTTON "&Quit",IDOK,79,103,57,30,WS_GROUP END [Resource.h] #define IDD_DATABASEAPP_DIALOG 102 #define IDR_MAINFRAME 128 #define IDC_BTN_DEPT 1000 #define IDC_BTN_EMP 1001 #define IDC_BTN_PRJCT 1002 #define IDC_BTN_WRKSN 1003 #define IDC_BTN_DEPTLOC 1004 #define IDC_BTN_DPNDNT 1005 #define IDC_BTN_VW #define IDC_BTN_VW #define IDC_BTN_VW #define IDC_BTN_VW Resource View DatabaseApp DatabaseApp.rc Dialog IDD_DATABASE_DIALOG IDD_DATABASE_DIALOG Class Wizard... Callback 함수 OnBtnDepartment OnBtnEmployee OnBtnProject OnBtnWorksOn OnBtnDeptLocations OnBtnDependent OnBtnView1 OnBtnView2 OnBtnView3 OnBtnView4 [DatabaseAppDlg.h]

3 public: afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() afx_msg void OnBtnDepartment(); afx_msg void OnBtnEmployee(); afx_msg void OnBtnProject(); afx_msg void OnBtnWorksOn(); afx_msg void OnBtnDeptLocations(); afx_msg void OnBtnDependent(); afx_msg void OnBtnView1(); afx_msg void OnBtnView2(); afx_msg void OnBtnView3(); afx_msg void OnBtnView4(); ; [DatabaseAppDlg.cpp] BEGIN_MESSAGE_MAP(CDatabaseAppDlg, CDialogEx) ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_BTN_DEPT, &CDatabaseAppDlg::OnBtnDepartment) ON_BN_CLICKED(IDC_BTN_EMP, &CDatabaseAppDlg::OnBtnEmployee) ON_BN_CLICKED(IDC_BTN_PRJCT, &CDatabaseAppDlg::OnBtnProject) ON_BN_CLICKED(IDC_BTN_WRKSN, &CDatabaseAppDlg::OnBtnWorksOn) ON_BN_CLICKED(IDC_BTN_DEPTLOC, &CDatabaseAppDlg::OnBtnDeptLocations) ON_BN_CLICKED(IDC_BTN_DPNDNT, &CDatabaseAppDlg::OnBtnDependent) ON_BN_CLICKED(IDC_BTN_VW1, &CDatabaseAppDlg::OnBtnView1) ON_BN_CLICKED(IDC_BTN_VW2, &CDatabaseAppDlg::OnBtnView2) ON_BN_CLICKED(IDC_BTN_VW3, &CDatabaseAppDlg::OnBtnView3) ON_BN_CLICKED(IDC_BTN_VW4, &CDatabaseAppDlg::OnBtnView4) END_MESSAGE_MAP() HCURSOR CDatabaseAppDlg::OnQueryDragIcon() return static_cast<hcursor>(m_hicon); void CDatabaseAppDlg::OnBtnDepartment() void CDatabaseAppDlg::OnBtnEmployee() void CDatabaseAppDlg::OnBtnProject() void CDatabaseAppDlg::OnBtnWorksOn() void CDatabaseAppDlg::OnBtnDeptLocations() void CDatabaseAppDlg::OnBtnDependent() void CDatabaseAppDlg::OnBtnView1() void CDatabaseAppDlg::OnBtnView2()

4 void CDatabaseAppDlg::OnBtnView3() void CDatabaseAppDlg::OnBtnView4() 1 단계저장압축파일 (1. DatabaseApp.zip) [ 제어판 관리도구 ODBC 데이터원본 (32비트)] 시스템 DSN 추가 Microsoft Access Driver(*.mdb, *.accdb) 데이터원본이름 : CompanyAccDB 선택 Company.accdb를선택한다. [DatabaseApp.h] #include <afxdb.h> #include "resource.h" // main symbols void ErrorMessage(CDBException *e, CString smsg); [DatabaseApp.cpp] void ErrorMessage(CDBException *e, CString smsg) CString strerrmsg = smsg + _T(".\15\12") + e->m_strerror; AfxMessageBox(strErrMsg, MB_OK MB_ICONINFORMATION); [DatabaseAppDlg.h] // Dialog Data #ifdef AFX_DESIGN_TIME enum IDD = IDD_DATABASEAPP_DIALOG ; #endif CDatabase *m_pdb; BOOL ConnectDB(void); protected: virtual void DoDataExchange(CDataExchange* pdx); // DDX/DDV support [DatabaseAppDlg.cpp] CDatabaseAppDlg::CDatabaseAppDlg(CWnd* pparent /*=NULL*/) : CDialogEx(CDatabaseAppDlg::IDD, pparent) static CDatabase adb; m_pdb = &adb; m_hicon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); BOOL CDatabaseAppDlg::OnInitDialog() CDialogEx::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon

5 SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here ConnectDB(); return TRUE; // return TRUE unless you set the focus to a control BOOL CDatabaseAppDlg::ConnectDB() int bisok = true; try m_pdb->open(_t("companyaccdb")); // m_pdb->open(null, false, false, "DSN=CompanyAccDB"); catch (CDBException* e) ErrorMessage(e, _T(" 데이타베이스에연결할수없습니다.")); e->delete(); bisok = false; return bisok; 질의결과의튜플을보여주는기능으로모든대화상자에사용된다. Class View 클래스마법사 프로젝트 : DatabaseApp, 클래스추가... Class Name: CIterator [Iterator.h] #include <afxdb.h> #pragma once class CIterator public: CIterator(void); ~CIterator(void); CDatabase *m_pdb; CRecordset *m_piterset; int m_nndx; int m_nndxmax; virtual void FetchTuple(BOOL bfetch = true) = 0; virtual CWnd *GetFirstButton(void) = 0; virtual CWnd *GetPrevButton(void) = 0; virtual CWnd *GetNextButton(void) = 0; virtual CWnd *GetLastButton(void) = 0; virtual CString &GetIterLabel(void) = 0; ; void EnableIterator(void); void FirstFetch(void); void PrevFetch(void); void NextFetch(void); void LastFetch(void); [Iterator.cpp] #include "stdafx.h" #include "Iterator.h" CIterator::CIterator(void)

6 CIterator::~CIterator(void) void CIterator::FirstFetch(void) m_piterset->movefirst(); m_nndx = 1; FetchTuple(); void CIterator::PrevFetch(void) m_piterset->moveprev(); m_nndx--; FetchTuple(); void CIterator::NextFetch(void) m_piterset->movenext(); m_nndx++; FetchTuple(); void CIterator::LastFetch(void) m_piterset->movelast(); m_nndx = m_nndxmax; FetchTuple(); void CIterator::EnableIterator(void) BOOL isenable = m_nndxmax >= 1 && m_nndx!= 1; GetFirstButton()->EnableWindow(isEnable); GetPrevButton()->EnableWindow(isEnable); isenable = m_nndxmax >= 1 && m_nndx!= m_nndxmax; GetNextButton()->EnableWindow(isEnable); GetLastButton()->EnableWindow(isEnable); CString strlabel("iteration"); if (m_nndxmax >= 1) CString strcount; strcount.format(cstring(" (%d/%d)"), m_nndx, m_nndxmax); strlabel += strcount; GetIterLabel() = strlabel; DB 에연산 ( 검색 / 삽입 / 삭제 / 수정 ) 을실행하기위하여대화상자와 CRecordset 에서유도되 는질의집합을생성한다. 2 단계저장압축파일 (2. Iterator.zip)

7 Department 테이블에대한연산 Insert/Delete/Update/Query 를하기위하여위와같은 대화상자를생성한다. 이를위하여 ⑴ 질의의결과를저장할집합클래스를생성하고, ⑵ 대화상자를디자인하고, ⑶ 테이블의튜플을 I/O 하기위하여대화상자클래스를생성한다. 바로앞에서언급한것처럼 Department 에연산하기위하여 CDeptDlg 와 CDeptSet 클래 스를생성해야한다. Class View Class Wizard Add Class... MFC ODBC 소비자... Data Source... 컴퓨터데이터원본 CompanyAccDB Tables Department Class: CDeptSet, DeptSet.h, DeptSet.cpp [DeptSet.h] CStringW CString [DeptSet.cpp] #error 삭제 #error Security Issue: The connection string may contain a password CString CDeptSet::GetDefaultConnect() return _T("DSN=CompanyAccDB"); CString CDeptSet::GetDefaultSQL() return _T("SELECT * FROM Department"); Resource View DatabaseApp DatabaseApp.rc Dialog Insert Dialog ID: IDD_DEPT_DLG Comtrol ID 레이블 Hotkey Callback 함수 / 멤버변수 Static, IDC_STATIC, DN&ame Edit, IDC_EDT_DNAME, m_strdname Static, IDC_STATIC, DNum&ber Edit, IDC_EDT_DNMBR, m_strdnumber Static, IDC_STATIC, M&grSSN Edit, IDC_EDT_MGRSSN, m_strmgrssn Static, IDC_STATIC, Mg&rStartDate

8 Edit, IDC_EDT_MGRDATE, m_strmgrstartdate Static, IDC_STATIC, &Where Edit, IDC_EDT_WHERE, m_strwhere Static, IDC_STATIC, &Set Edit, IDC_EDT_SET, m_strset Group, IDC_STATIC, Operation Button, IDC_BTN_QUERY, &Query, OnBtnQuery Button, IDC_BTN_INSERT, &Insert, OnBtnInsert Button, IDC_BTN_DELETE, &Delete, OnBtnDelete Button, IDC_BTN_UPDATE, &Update, OnBtnUpdate Group, IDC_STC_ITER, Iteration, m_striteration Button, IDC_BTN_FIRST, &First, OnBtnFirst Button, IDC_BTN_PREV, &Prev, OnBtnPrev Button, IDC_BTN_NEXT, &Next, OnBtnNext Button, IDC_BTN_LAST, &Last, OnBtnLast Button, IDOK, Qui&t Check Mnemonic ;; 단축키의중복체크 Tab Order ;; Control( 버튼 ) 들의순서를지정 Tap Stop ;; Tab으로 Control들사이를이동 Group ;; Control들의그룹 [DatabaseApp.rc] IDD_DEPT_DLG DIALOGEX 0, 0, 257, 142 STYLE DS_SETFONT DS_MODALFRAME DS_FIXEDSYS WS_POPUP WS_CAPTION WS_SYSMENU CAPTION "Department Table" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN RTEXT "DN&ame",IDC_STATIC,7,7,45,12 EDITTEXT IDC_EDT_DNAME,59,7,76,12,ES_AUTOHSCROLL RTEXT "DNum&ber",IDC_STATIC,7,28,45,12 EDITTEXT IDC_EDT_DNMBR,59,28,18,12,ES_AUTOHSCROLL RTEXT "M&grSSN",IDC_STATIC,7,49,45,12 EDITTEXT IDC_EDT_MGRSSN,59,49,52,12,ES_AUTOHSCROLL RTEXT "Mg&rStartDate",IDC_STATIC,7,70,45,12 EDITTEXT IDC_EDT_MGRDATE,59,70,52,12,ES_AUTOHSCROLL RTEXT "&Where",IDC_STATIC,7,105,45,12 EDITTEXT IDC_EDT_WHERE,59,105,128,12,ES_AUTOHSCROLL RTEXT "&Set",IDC_STATIC,7,123,45,12 EDITTEXT IDC_EDT_SET,59,120,128,12,ES_AUTOHSCROLL GROUPBOX "Operation",IDC_STATIC,145,7,104,56 PUSHBUTTON "&Query",IDC_BTN_QUERY,155,21,84,17,WS_GROUP PUSHBUTTON "&Insert",IDC_BTN_INSERT,155,39,28,17,NOT WS_TABSTOP PUSHBUTTON "&Delete",IDC_BTN_DELETE,183,39,28,17,NOT WS_TABSTOP PUSHBUTTON "&Update",IDC_BTN_UPDATE,211,39,28,17,NOT WS_TABSTOP GROUPBOX "Iteration",IDC_STC_ITER,145,66,104,37,WS_GROUP PUSHBUTTON "&First",IDC_BTN_FIRST,155,79,20,16,WS_GROUP PUSHBUTTON "&Prev",IDC_BTN_PREV,176,79,20,16,NOT WS_TABSTOP PUSHBUTTON "&Next",IDC_BTN_NEXT,197,79,20,16,NOT WS_TABSTOP PUSHBUTTON "&Last",IDC_BTN_LAST,218,79,20,16,NOT WS_TABSTOP PUSHBUTTON "Qui&t",IDOK,200,105,50,27,WS_GROUP END [Resource.h] #define IDR_MAINFRAME 128 #define IDD_DATABASEAPP_DIALOG 102 #define IDD_DEPT_DLG 129

9 #define IDC_BTN_DEPT 1000 #define IDC_BTN_EMP 1001 #define IDC_EDT_DNAME 1001 #define IDC_BTN_PRJCT 1002 #define IDC_EDT_DNMBR 1002 #define IDC_BTN_WRKSN 1003 #define IDC_EDT_MGRSSN 1003 #define IDC_BTN_DEPTLOC 1004 #define IDC_EDT_MGRDATE 1004 #define IDC_BTN_DPNDNT 1005 #define IDC_EDT_WHERE 1005 #define IDC_BTN_VW #define IDC_EDT_SET 1006 #define IDC_BTN_VW #define IDC_BTN_QUERY 1007 #define IDC_BTN_VW #define IDC_BTN_INSERT 1008 #define IDC_BTN_VW #define IDC_BTN_DELETE 1009 #define IDC_BTN_UPDATE 1010 #define IDC_STC_ITER 1011 #define IDC_BTN_FIRST 1012 #define IDC_BTN_PREV 1013 #define IDC_BTN_NEXT 1014 #define IDC_BTN_LAST 1015 IDD_DEPT_DLG Add Class... Class Name: CDeptDlg IDD_DEPT_DLG Class Wizard... virtual function Callback 함수 멤버변수 OnInitDialog OnBtnQuery OnBtnInsert OnBtnDelete OnBtnUpdate OnBtnFirst OnBtnPrev OnBtnNext OnBtnLast m_strdname m_strdnumber m_strmgrssn m_strmgrstartdate m_strwhere m_strset m_striteration 가상함수, callback 함수, 멤버변수를설정한결과는다음과같다. [DeptDlg.h] protected: virtual void DoDataExchange(CDataExchange* pdx); // DDX/DDV 지원입니다. public: ; DECLARE_MESSAGE_MAP() virtual BOOL OnInitDialog(); afx_msg void OnBtnQuery(); afx_msg void OnBtnInsert(); afx_msg void OnBtnDelete(); afx_msg void OnBtnUpdate(); afx_msg void OnBtnFirst(); afx_msg void OnBtnPrev(); afx_msg void OnBtnNext(); afx_msg void OnBtnLast(); CString m_strdname; CString m_strdnumber; CString m_strmgrssn; CString m_strmgrstartdate; CString m_strwhere; CString m_strset; CString m_striteration; [DeptDlg.cpp] CDeptDlg::CDeptDlg(CWnd* pparent /*=NULL*/) : CDialogEx(IDD_DEPT_DLG, pparent), m_strdname(_t("")), m_strdnumber(_t("")), m_strmgrssn(_t("")), m_strmgrstartdate(_t(""))

10 , m_strwhere(_t("")), m_strset(_t("")), m_striteration(_t("")) CDeptDlg::~CDeptDlg() void CDeptDlg::DoDataExchange(CDataExchange* pdx) CDialogEx::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDT_DNAME, m_strdname); DDX_Text(pDX, IDC_EDT_DNMBR, m_strdnumber); DDX_Text(pDX, IDC_EDT_MGRSSN, m_strmgrssn); DDX_Text(pDX, IDC_EDT_MGRDATE, m_strmgrstartdate); DDX_Text(pDX, IDC_EDT_WHERE, m_strwhere); DDX_Text(pDX, IDC_EDT_SET, m_strset); DDX_Text(pDX, IDC_STC_ITER, m_striteration); BEGIN_MESSAGE_MAP(CDeptDlg, CDialogEx) ON_BN_CLICKED(IDC_BTN_QUERY, &CDeptDlg::OnBtnQuery) ON_BN_CLICKED(IDC_BTN_INSERT, &CDeptDlg::OnBtnInsert) ON_BN_CLICKED(IDC_BTN_DELETE, &CDeptDlg::OnBtnDelete) ON_BN_CLICKED(IDC_BTN_UPDATE, &CDeptDlg::OnBtnUpdate) ON_BN_CLICKED(IDC_BTN_FIRST, &CDeptDlg::OnBtnFirst) ON_BN_CLICKED(IDC_BTN_PREV, &CDeptDlg::OnBtnPrev) ON_BN_CLICKED(IDC_BTN_NEXT, &CDeptDlg::OnBtnNext) ON_BN_CLICKED(IDC_BTN_LAST, &CDeptDlg::OnBtnLast) END_MESSAGE_MAP() // CDeptDlg 메시지처리기입니다. BOOL CDeptDlg::OnInitDialog() CDialogEx::OnInitDialog(); // TODO: 여기에추가초기화작업을추가합니다. return TRUE; // return TRUE unless you set the focus to a control // 예외 : OCX 속성페이지는 FALSE 를반환해야합니다. void CDeptDlg::OnBtnQuery() void CDeptDlg::OnBtnInsert() void CDeptDlg::OnBtnDelete() void CDeptDlg::OnBtnUpdate() void CDeptDlg::OnBtnFirst() void CDeptDlg::OnBtnPrev()

11 void CDeptDlg::OnBtnNext() void CDeptDlg::OnBtnLast() 이제준비작업이완료되었으니본겨적인데이터베이스연산작업을시작한다. 먼저질의 의결과로생성된튜플들의순회하기위한 iterator 를장착한다. [DeptDlg.h] #include "Iterator.h" #include "DeptSet.h" #pragma once // CDeptDlg dialog class CDeptDlg : public CDialogEx, public CIterator DECLARE_DYNAMIC(CDeptDlg) public: CDeptDlg(CWnd* pparent = NULL); virtual ~CDeptDlg(); // standard constructor // Dialog Data #ifdef AFX_DESIGN_TIME enum IDD = IDD_DEPT_DLG ; #endif CDeptSet *m_pset; virtual void FetchTuple(BOOL bfetch = true); virtual CWnd *GetFirstButton(void); virtual CWnd *GetPrevButton(void); virtual CWnd *GetNextButton(void); virtual CWnd *GetLastButton(void); virtual CString &GetIterLabel(void); protected: virtual BOOL OnInitDialog(); virtual void DoDataExchange(CDataExchange* pdx); // DDX/DDV support [DeptDlg.cpp] CDeptDlg::CDeptDlg(CWnd* pparent /*=NULL*/) : CDialogEx(CDeptDlg::IDD, pparent), m_strdname(_t("")), m_strdnumber(_t("")), m_strmgrssn(_t("")), m_strmgrstartdate(_t("")), m_strwhere(_t("")), m_strset(_t("")), m_striteration(_t("iteration")) static CDeptSet aqueryset; m_piterset = m_pset = &aqueryset; // CDeptDlg message handlers BOOL CDeptDlg::OnInitDialog() CDialogEx::OnInitDialog(); // TODO: Add extra initialization here

12 m_nndxmax = 0; return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE CWnd *CDeptDlg::GetFirstButton(void) return GetDlgItem(IDC_BTN_FIRST); CWnd *CDeptDlg::GetPrevButton(void) return GetDlgItem(IDC_BTN_PREV); CWnd *CDeptDlg::GetNextButton(void) return GetDlgItem(IDC_BTN_NEXT); CWnd *CDeptDlg::GetLastButton(void) return GetDlgItem(IDC_BTN_LAST); CString &CDeptDlg::GetIterLabel(void) return m_striteration; void CDeptDlg::OnBtnQuery() UpdateData(); try if (m_pset->isopen()) m_pset->close(); CString strsql = m_pset->getdefaultsql(); if (!m_strwhere.trim().isempty()) strsql += _T(" WHERE ") + m_strwhere; m_pset->open(crecordset::dynaset, strsql); while (!m_pset->iseof()) m_pset->movenext(); m_nndxmax = m_pset->getrecordcount(); FirstFetch(); UpdateData(false); catch (CDBException *e) ErrorMessage(e, _T("Query Failure")); e->delete(); m_nndxmax = 0; void CVw1Dlg::OnBtnFirst() FirstFetch(); UpdateData(false); void CVw1Dlg::OnBtnPrev() PrevFetch(); UpdateData(false); void CVw1Dlg::OnBtnNext() NextFetch(); UpdateData(false); void CVw1Dlg::OnBtnLast()

13 LastFetch(); UpdateData(false); void CDeptDlg::FetchTuple(BOOL bfetch) if (bfetch) else [DatabaseAppDlg.cpp] #include "stdafx.h" #include "DatabaseApp.h" #include "DatabaseAppDlg.h" #include "afxdialogex.h" #include "DeptDlg.h" // adlg <--- arecordset m_strdname = m_pset->m_dname.trimright(); m_strdnumber.format(_t("%d"), m_pset->m_dnumber); m_strmgrssn = m_pset->m_mgrssn.trimright(); m_strmgrstartdate = m_pset->m_mgrstartdate.trimright(); // arecordset <--- adlg m_pset->m_dname = (LPCTSTR)m_strDName; m_pset->m_dnumber = atoi((const char *)(LPCTSTR)m_strDNumber); m_pset->m_mgrssn = (LPCTSTR)m_strMgrSSN; m_pset->m_mgrstartdate = (LPCTSTR)m_strMgrStartDate; void CDatabaseAppDlg::OnBtnDepartment() CDeptDlg adlg; adlg.m_pdb = m_pdb; adlg.domodal(); 3 단계저장압축파일 (3. Department.zip) strsql = INSERT INTO Department VALUES(...) m_pdb->executesql(strsql); [DeptDlg.cpp] void CDeptDlg::OnBtnInsert() UpdateData(); try if (m_pset->isopen()) m_pset->close(); CString strsql = _T("INSERT INTO Department VALUES ("); CString *attrs = &m_strdname; int nctr = (int)m_pset->m_nfields; for (int nndx = 0; nndx < nctr; nndx++) strsql += (nndx)? _T(", ") : _T(""); strsql += (attrs[nndx].trim().isempty())? _T("NULL") : _T("'") + attrs[nndx] + _T("'"); strsql += _T(")"); m_pdb->executesql(strsql); AfxMessageBox(_T("Success...")); catch (CDBException* e) ErrorMessage(e, _T("Department 를삽입할수없습니다 ")); e->delete(); m_nndxmax = 0;

14 CRecordset m_pset이 open되어있는상태에서 m_pset->addnew() 를호출한후에 m_pset의애트리뷰트들에값들을전달하고 m_pset->update() 를호출한다. [DeptDlg.cpp] void CDeptDlg::OnBtnInsert() UpdateData(); try if (!m_pset->isopen()) m_pset->open(); m_pset->addnew(); FetchTuple(false); m_pset->update(); m_pset->close(); AfxMessageBox(_T("Success...")); catch (CDBException* e) ErrorMessage(e, _T("Department 를삽입할수없습니다 ")); e->delete(); m_nndxmax = 0; // default SQL // arecordset <-- adlg strsql = DELETE FROM Department WHERE DNumber= %s m_pdb->executesql(strsql); [DeptDlg.cpp] void CDeptDlg::OnBtnDelete() UpdateData(); try if (m_pset->isopen()) m_pset->close(); CString strsql = _T("DELETE FROM Department WHERE DNumber=") + m_strdnumber; m_pdb->executesql(strsql); AfxMessageBox(_T("Success...")); catch (CDBException* e) ErrorMessage(e, _T("Department 를삭제할수없습니다 ")); e->delete(); m_nndxmax = 0; CRecordset m_pset 이 open 되어있는상태에서 m_pset->delete() 를호출한다. [DeptDlg.cpp] void CDeptDlg::OnBtnDelete() UpdateData(); try m_pset->delete();

15 AfxMessageBox(_T("Success...")); catch (CDBException* e) ErrorMessage(e, _T("Department 를삭제할수없습니다 ")); e->delete(); m_nndxmax = 0; strsql = UPDATE Department SET %s WHERE DNumber=%s 를작성하여 m_pdb->executesql(strsql); [DeptDlg.cpp] void CDeptDlg::OnBtnUpdate() UpdateData(); try if (m_pset->isopen()) m_pset->close(); if (m_strset.isempty()) AfxMessageBox(_T("SET 절이없습니다.")); return; CString strsql = _T("UPDATE Department SET ") + m_strset + _T(" WHERE DNumber=") + m_strdnumber; m_pdb->executesql((lpctstr)strsql); AfxMessageBox(_T("Success...")); catch (CDBException* e) ErrorMessage(e, _T("Department 를수정할수없습니다 ")); e->delete(); m_nndxmax = 0; 키값으로해당튜플을검색하여 CRecordset m_pset 이 open 되어있는상태에서 m_pset->edit() 를호출한후에 m_pset 의애트리뷰트들에값들을전달하고 m_pset->update() 를호출한다. [DeptDlg.cpp] void CDeptDlg::OnBtnUpdate() UpdateData(); try if (m_pset->isopen()) m_pset->close(); if (m_strset.isempty()) AfxMessageBox(_T("SET 절이없습니다.")); return; CString strsql = m_pset->getdefaultsql() + _T(" WHERE DNumber=") + m_strdnumber; m_pset->open(crecordset::dynaset, strsql); m_pset->movefirst(); m_pset->edit(); FetchTuple(false); m_pset->update(); m_pset->close(); AfxMessageBox(_T("Success...")); catch (CDBException* e) // arecordset <--- adlg

16 ErrorMessage(e, _T("Department 를수정할수없습니다 ")); e->delete(); m_nndxmax = 0; 4 단계저장압축파일 (4. InsDelUpd.zip) View에대한연산 Query를하기위하여위와같은대화상자를생성한다. 이를위하여 ⑴ 질의의결과를저장할집합클래스를생성하고, ⑵ 대화상자를디자인하고, ⑶ 테이블의튜플을 I/O하기위하여대화상자클래스를생성한다. 데이터베이스에다음과같은 View WorksOnView가정의되어있다고가정한다. CREATE VIEW WorksOnView AS SELECT FName, LName, PName, Hours FROM (Employee JOIN WorksOn ON SSN=ESSN) JOIN Project ON DNum=PNumber 바로앞에서언급한것처럼 WorksOnView에연산하기위하여 CVw1Dlg와 CVw1Set 클래스를생성해야한다. Class View Class Wizard Add Class... MFC ODBC Consumer... Data Source... 컴퓨터데이터원본 CompanyAccDB Views WorksOnView Class: CVw1Set, Vw1Set.h, Vw1Set.cpp [Vw1Set.h] CStringW CString [Vw1Set.cpp] #error 삭제 #error Security Issue: The connection string may contain a password CString CVw1Set::GetDefaultConnect() return _T("DSN=CompanyAccDB"); CString CVw1Set::GetDefaultSQL() return _T("SELECT * FROM WorksOnView"); Resource View DatabaseApp DatabaseApp.rc Dialog Insert Dialog ID: IDD_VIEW1_DLG

17 Comtrol ID 레이블 Hotkey Callback 함수 / 멤버변수 Static, &FName Edit, IDC_EDT_FNAME, m_strfname Static, &LName Edit, IDC_EDT_LNAME, m_strlname Static, &PName Edit, IDC_EDT_PNAME, m_strpname Static, &Hours Edit, IDC_EDT_HOURS, m_strhours Static, &Where Edit, IDC_EDT_WHERE, m_strwhere Button, IDC_BTN_QUERY, &Query, OnBtnQuery Button, IDOK, &Quit Group, ID: IDC_STC_ITER, Iteration, m_striteration Button, IDC_BTN_FIRST, &First, OnBtnFirst Button, IDC_BTN_PREV, &Prev, OnBtnPrev Button, IDC_BTN_PREV, &Next, OnBtnNext Button, IDC_BTN_LAST, &Last, OnBtnLast Check Mnemonic ;; 단축키의중복체크 Tab Order ;; Control( 버튼 ) 들의순서를지정 Tap Stop ;; Tab으로 Control들사이를이동 Group ;; Control들의그룹 [DatabaseApp.rc] IDD_VIEW1_DLG DIALOGEX 0, 0, 211, 94 STYLE DS_SETFONT DS_MODALFRAME DS_FIXEDSYS WS_POPUP WS_CAPTION WS_SYSMENU CAPTION "Employee~WorksOn~Project" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN RTEXT "FN&ame:",IDC_STATIC,7,7,27,12 EDITTEXT IDC_EDT_FNAME,38,7,55,12,ES_AUTOHSCROLL RTEXT "LNa&me:",IDC_STATIC,7,23,27,12 EDITTEXT IDC_EDT_LNAME,38,23,55,12,ES_AUTOHSCROLL RTEXT "PNam&e:",IDC_STATIC,7,39,27,12 EDITTEXT IDC_EDT_PNAME,38,39,55,12,ES_AUTOHSCROLL RTEXT "&Hours:",IDC_STATIC,7,55,27,12 EDITTEXT IDC_EDT_HOURS,38,55,55,12,ES_AUTOHSCROLL RTEXT "&Where:",IDC_STATIC,7,75,27,12 EDITTEXT IDC_EDT_WHERE,38,75,166,12,ES_AUTOHSCROLL PUSHBUTTON "&Query",IDC_BTN_QUERY,103,7,56,21 PUSHBUTTON "Q&uit",IDOK,168,7,36,21 GROUPBOX "Iteration",IDC_STC_ITER,98,30,106,42,WS_GROUP PUSHBUTTON "&First",IDC_BTN_FIRST,103,44,24,21,WS_GROUP PUSHBUTTON "&Prev",IDC_BTN_PREV,127,44,24,21,NOT WS_TABSTOP PUSHBUTTON "&Next",IDC_BTN_NEXT,151,44,24,21,NOT WS_TABSTOP PUSHBUTTON "&Last",IDC_BTN_LAST,175,44,24,21,NOT WS_TABSTOP END [Resource.h] #define IDD_DATABASEAPP_DIALOG 102 #define IDR_MAINFRAME 128 #define IDD_DEPT_DLG 129 #define IDD_VIEW1_DLG 130 #define IDC_BTN_DEPT 1000

18 #define IDC_BTN_EMP 1001 #define IDC_EDT_DNAME 1001 #define IDC_EDT_FNAME 1001 #define IDC_BTN_PRJCT 1002 #define IDC_EDT_DNMBR 1002 #define IDC_EDT_LNAME 1002 #define IDC_BTN_WRKSN 1003 #define IDC_EDT_MGRSSN 1003 #define IDC_EDT_PNAME 1003 #define IDC_BTN_DEPTLOC 1004 #define IDC_EDT_MGRDATE 1004 #define IDC_EDT_HOURS 1004 #define IDC_BTN_DPNDNT 1005 #define IDC_EDT_WHERE 1005 #define IDC_BTN_VW #define IDC_EDT_SET 1006 #define IDC_BTN_VW #define IDC_BTN_QUERY 1007 #define IDC_BTN_VW #define IDC_BTN_INSERT 1008 #define IDC_BTN_VW #define IDC_BTN_DELETE 1009 #define IDC_BTN_UPDATE 1010 #define IDC_STC_ITER 1011 #define IDC_BTN_FIRST 1012 #define IDC_BTN_PREV 1013 #define IDC_BTN_NEXT 1014 #define IDC_BTN_LAST 1015 IDD_VIEW1_DLG Add Class... Class Name: CVw1Dlg IDD_VIEW1_DLG Class Wizard... virtual function Callback 함수멤버변수 OnInitDialog OnBtnQuery OnBtnFirst OnBtnPrev OnBtnNext OnBtnLast m_strfname m_strlname m_strpname m_strhours m_strwhere m_striteration 가상함수, callback 함수, 멤버변수를설정한결과는다음과같다. [Vw1Dlg.h] public: ; DECLARE_MESSAGE_MAP() virtual BOOL OnInitDialog(); afx_msg void OnBtnQuery(); afx_msg void OnBtnFirst(); afx_msg void OnBtnPrev(); afx_msg void OnBtnNext(); afx_msg void OnClickedBtnLast(); CString m_strfname; CString m_strlname; CString m_strpname; CString m_strhours; CString m_strwhere; CString m_striteration; [Vw1Dlg.cpp] CVw1Dlg::CVw1Dlg(CWnd* pparent /*=NULL*/) : CDialogEx(IDD_VIEW1_DLG, pparent), m_strfname(_t("")), m_strlname(_t("")), m_strpname(_t("")), m_strhours(_t("")), m_strwhere(_t("")), m_striteration(_t("")) void CVw1Dlg::DoDataExchange(CDataExchange* pdx)

19 CDialogEx::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDT_FNAME, m_strfname); DDX_Text(pDX, IDC_EDT_LNAME, m_strlname); DDX_Text(pDX, IDC_EDT_PNAME, m_strpname); DDX_Text(pDX, IDC_EDT_HOURS, m_strhours); DDX_Text(pDX, IDC_EDT_WHERE, m_strwhere); DDX_Text(pDX, IDC_STC_ITER, m_striteration); BEGIN_MESSAGE_MAP(CVw1Dlg, CDialogEx) ON_BN_CLICKED(IDC_BTN_QUERY, &CVw1Dlg::OnBtnQuery) ON_BN_CLICKED(IDC_BTN_FIRST, &CVw1Dlg::OnBtnFirst) ON_BN_CLICKED(IDC_BTN_PREV, &CVw1Dlg::OnBtnPrev) ON_BN_CLICKED(IDC_BTN_NEXT, &CVw1Dlg::OnBtnNext) ON_BN_CLICKED(IDC_BTN_LAST, &CVw1Dlg::OnClickedBtnLast) END_MESSAGE_MAP() BOOL CVw1Dlg::OnInitDialog() CDialogEx::OnInitDialog(); // TODO: 여기에추가초기화작업을추가합니다. return TRUE; // return TRUE unless you set the focus to a control // 예외 : OCX 속성페이지는 FALSE 를반환해야합니다. void CVw1Dlg::OnBtnQuery() void CVw1Dlg::OnBtnFirst() void CVw1Dlg::OnBtnPrev() void CVw1Dlg::OnBtnNext() void CVw1Dlg::OnClickedBtnLast() 이제준비작업이완료되었으니본겨적인데이터베이스연산작업을시작한다. 먼저질의 의결과로생성된튜플들의순회하기위한 iterator 를장착한다. [Vw1Dlg.h] #include "Iterator.h" #include "Vw1Set.h" #pragma once // CDeptDlg dialog class CDeptDlg : public CDialogEx, public CIterator DECLARE_DYNAMIC(CDeptDlg) public: CDeptDlg(CWnd* pparent = NULL); virtual ~CDeptDlg(); // standard constructor

20 #ifdef AFX_DESIGN_TIME enum IDD = IDD_VIEW1_DLG ; #endif CVw1Set *m_pset; virtual void FetchTuple(BOOL bfetch = true); virtual CWnd *GetFirstButton(void); virtual CWnd *GetPrevButton(void); virtual CWnd *GetNextButton(void); virtual CWnd *GetLastButton(void); virtual CString &GetIterLabel(void); protected: virtual void DoDataExchange(CDataExchange* pdx); // DDX/DDV support [Vw1Dlg.cpp] CVw1Dlg::CVw1Dlg(CWnd* pparent /*=NULL*/) : CDialogEx(CVw1Dlg::IDD, pparent), m_strfname(_t("")), m_strlname(_t("")), m_strpname(_t("")), m_strhours(_t("")), m_strwhere(_t("")), m_striteration(_t("iteration")) static CVw1Set aqueryset; m_piterset = m_pset = &aqueryset; BOOL CVw1Dlg::OnInitDialog() CDialogEx::OnInitDialog(); // TODO: Add extra initialization here m_nndxmax = 0; return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE CWnd *CVw1Dlg::GetFirstButton(void) return GetDlgItem(IDC_BTN_FIRST); CWnd *CVw1Dlg::GetPrevButton(void) return GetDlgItem(IDC_BTN_PREV); CWnd *CVw1Dlg::GetNextButton(void) return GetDlgItem(IDC_BTN_NEXT); CWnd *CVw1Dlg::GetLastButton(void) return GetDlgItem(IDC_BTN_LAST); CString &CVw1Dlg::GetIterLabel(void) return m_striteration; void CVw1Dlg::OnBtnQuery() UpdateData(); try if (m_pset->isopen()) m_pset->close();

21 CString strsql = m_pset->getdefaultsql(); if (!m_strwhere.trim().isempty()) strsql += _T(" WHERE ") + m_strwhere; m_pset->open(crecordset::dynaset, strsql); while (!m_pset->iseof()) m_pset->movenext(); m_nndxmax = m_pset->getrecordcount(); FirstFetch(); UpdateData(false); catch (CDBException *e) ErrorMessage(e, _T("Query Failure")); e->delete(); m_nndxmax = 0; void CVw1Dlg::OnBtnFirst() FirstFetch(); UpdateData(false); void CVw1Dlg::OnBtnPrev() PrevFetch(); UpdateData(false); void CVw1Dlg::OnBtnNext() NextFetch(); UpdateData(false); void CVw1Dlg::OnBtnLast() LastFetch(); UpdateData(false); void CVw1Dlg::FetchTuple(BOOL bfetch) if (bfetch) m_strfname = m_pset->m_fname.trimright(); m_strlname = m_pset->m_lname.trimright(); m_strpname = m_pset->m_pname.trimright(); m_strhours.format(_t("%d"), m_pset->m_hours); [DatabaseAppDlg.cpp] #include "stdafx.h" #include "DatabaseApp.h" #include "DatabaseAppDlg.h" #include "afxdialogex.h" #include "DeptDlg.h" #include "Vw1Dlg.h" void CDatabaseAppDlg::OnBtnView1() CVw1Dlg adlg; adlg.m_pdb = m_pdb; adlg.domodal(); 5 단계저장압축파일 (5. WorksOnView.zip)

22 CRecordset Window Control CDialog class CRecordset database Windows Dialog의 Control( 주로 Edit) adlg.updatedata(true) adlg.updatedata(false) CDialog-derived class(cdeptdlg) 멤버변수 (adlg.m_strdname) qrset.addnew() 두클래스의대응변수들로이동 qrset.delete() (FetchTuple 함수참조 ) qrset.edit() CRecordset-derived class(cdeptset) 멤버변수 (qrset.m_dname) DoFieldExchange(CFieldExchange *pfx) qrset.update() qrset.open(ntype, strsql) Database (Disk의파일 ) 연결 : adb.open(strdsn) adb.open(null, false, false, strdsn) 변경 : adb.execute(strsql) // Insert/Delete/Update 검색 : qrset.open(ntype, strsql) // MoveFirst, Last, Prev, Next 끊기 : adb.close()

Programming hwp

Programming hwp 4.2 메뉴및컨트롤들의추가 이절에서다룰예제프로그램은덧셈 / 곱셈문제를제시하고답을검사해주는프로그램이다. 이프로그램을실행하면두개의한자리숫자들이무작위로생성되어 "Number 1" 과 "Number 2" 옆의에디트컨트롤에나타난다. Exec 메뉴안에는 Renew라는메뉴항목이있으며, 이메뉴항목을선택할때마다숫자들은무작위로변경된다. Exec 메뉴안의 Change Level

More information

윈도우시스템프로그래밍

윈도우시스템프로그래밍 데이터베이스및설계 MySQL 을위한 MFC 를사용한 ODBC 프로그래밍 2012.05.10. 오병우 컴퓨터공학과금오공과대학교 http://www.apmsetup.com 또는 http://www.mysql.com APM Setup 설치발표자료참조 Department of Computer Engineering 2 DB 에속한테이블보기 show tables; 에러발생

More information

<4D F736F F F696E74202D203039C0E520B4EBC8ADBBF3C0DA205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D203039C0E520B4EBC8ADBBF3C0DA205BC8A3C8AF20B8F0B5E55D> 09: 대화상자 학습목표 대화상자편집기의사용법을익힌다. 모드형대화상자와비모드형대화상자의차이점을이해하고작성방법을익힌다. 대화상자기반응용프로그램의원리를이해하고작성방법을익힌다. 공통대화상자를다루는방법을배운다. 개요 (1/2) 대화상자 다양한컨트롤을포함하고있는일종의윈도우 사용자로부터입력을받거나정보를출력 1 개요 (2/2) 대화상자종류 모드형대화상자 대화상자를닫지않으면응용프로그램이더이상진행할수없다.

More information

8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 )

8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 ) 8 장데이터베이스 8.1 기본개념 - 데이터베이스 : 데이터를조직적으로구조화한집합 (cf. 엑셀파일 ) - 테이블 : 데이터의기록형식 (cf. 엑셀시트의첫줄 ) - 필드 : 같은종류의데이터 (cf. 엑셀시트의각칸 ) - 레코드 : 데이터내용 (cf. 엑셀시트의한줄 ) - DDL(Data Definition Language) : show, create, drop

More information

윈도우시스템프로그래밍

윈도우시스템프로그래밍 객체지향프로그래밍응용 Chap 4. 대화상자와컨트롤 (#1) 2013.09.27. 오병우 컴퓨터공학과금오공과대학교 Control 들을가진윈도우 Dialog 개요 사용자의입력을받기위한 Object 의집합 종류 프로그램수행도중사용자의입력이필요할때다이얼로그박스출력 다이얼로그박스는사용자로부터입력받은데이터를메인루틴에넘기고소멸 Modal Dialog Parent window

More information

윈도우시스템프로그래밍

윈도우시스템프로그래밍 데이타베이스 MySQL 을위한 MFC 를사용한 ODBC 프로그래밍 2013.05.15. 오병우 컴퓨터공학과금오공과대학교 http://www.apmsetup.com 또는 http://www.mysql.com APM Setup 설치발표자료참조 Department of Computer Engineering 2 DB 에속한테이블보기 show tables; 에러발생

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

<C1A62038B0AD20B0ADC0C7B3EBC6AE2E687770>

<C1A62038B0AD20B0ADC0C7B3EBC6AE2E687770> 제 8강 SQL: 관계데이터베이스언어 강의목표 관계데이타베이스언어로서상용 DBMS에서가장널리사용되는 SQL의동작원리에관하여학습하고, 이를이용하여다양한질의문을작성하는방법을습득한다 기대효과 SQL의데이터정의기능을이해한다 SQL의데이터조작기능중질의기능을이해한다 SQL의데이터조작기능중데이터갱신기능을이해한다 SQL의데이터조작기능중뷰및인덱스관련기능을이해한다 SQL 의개요

More information

Dialog Box 실행파일을 Web에 포함시키는 방법

Dialog Box 실행파일을 Web에 포함시키는 방법 DialogBox Web 1 Dialog Box Web 1 MFC ActiveX ControlWizard workspace 2 insert, ID 3 class 4 CDialogCtrl Class 5 classwizard OnCreate Create 6 ActiveX OCX 7 html 1 MFC ActiveX ControlWizard workspace New

More information

윈도우시스템프로그래밍

윈도우시스템프로그래밍 객체지향프로그래밍응용 Chap 4. 대화상자와컨트롤 (#2) 2012.10.08. 오병우 컴퓨터공학과금오공과대학교 Control 들을가진윈도우 Dialog 개요 사용자의입력을받기위한 Object 의집합 종류 프로그램수행도중사용자의입력이필요할때다이얼로그박스출력 다이얼로그박스는사용자로부터입력받은데이터를메인루틴에넘기고소멸 Modal Dialog Parent window

More information

<4D F736F F F696E74202D E DB0FCB0E820BBE7BBF3BFA120C0C7C7D120B0FCB0E820B5A5C0CCC5CDBAA3C0CCBDBA20BCB3B0E8>

<4D F736F F F696E74202D E DB0FCB0E820BBE7BBF3BFA120C0C7C7D120B0FCB0E820B5A5C0CCC5CDBAA3C0CCBDBA20BCB3B0E8> 데이터베이스 (Database) ER- 관계사상에의한관계데이터베이스설계 문양세강원대학교 IT특성화대학컴퓨터과학전공 설계과정 [ 그림 3.1] 작은세계 요구사항들의수정과분석 Functional Requirements 데이타베이스요구사항들 FUNCTIONAL ANALYSIS 개념적설계 ERD 사용 High level ltransaction Specification

More information

Microsoft PowerPoint - QVIZMVUMWURI.pptx

Microsoft PowerPoint - QVIZMVUMWURI.pptx 데이타베이스시스템 2011.03 충북대학교경영정보학과조완섭 (wscho@chungbuk.ac.kr) Chap. 4 SQL 질의어 C4 2 목차 - SQL2에서데이터정의, 제약조건및스키마변경 - SQL에서의기본질의 - 더복잡한 SQL 질의들 - SQL에서삽입, 삭제, 갱신구문 - SQL 뷰 - 주장으로추가적인제약조건명시 - SQL의부가적인기능들 Ch4 3 SQL

More information

[제1강] 텍스트를 입력하세요

[제1강] 텍스트를  입력하세요 제 14 강 채팅프로젝트 1-1 Visual C++ 프로그래밍 컴퓨터과학과 김강현교수 제 14강의학습내용소켓 (Socket) 서버와클라이언트 CAsyncSocket 와 Csocket Listen, OnAccept, OnReceive 소켓 (Socket) 의개요 TCP/IP 프로토콜을이용하여네트워크프로그램을개설하기위핚인터페이스 젂선과젂구사이에는소켓이라는것이있다.

More information

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 ALTIBASE HDB 6.5.1.5.10 Patch Notes 목차 BUG-46183 DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG-46249 [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 BUG-46266 [sm]

More information

Microsoft PowerPoint - hci2-lecture9.ppt

Microsoft PowerPoint - hci2-lecture9.ppt Overview 대화상자 대화상자, 대화상자템플렛, 대화상자편집기 모드형대화상자와비모드형대화상자의차이 대화상자기반응용프로그램 HCI Programming 2 (321190) 2007 년가을학기 11/19/2007 박경신 2 대화상자 대화상자 (Dialog Box) 다양한컨트롤을포함하고있는일종의윈도우 사용자로부터입력을받거나정보를출력 정적, 버튼, 편집등다양한컨트롤들을배치하고관리하는윈도우

More information

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자 SQL Developer Connect to TimesTen 유니원아이앤씨 DB 팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 2010-07-28 작성자 김학준 최종수정일 2010-07-28 문서번호 20100728_01_khj 재개정이력 일자내용수정인버전

More information

10.ppt

10.ppt : SQL. SQL Plus. JDBC. SQL >> SQL create table : CREATE TABLE ( ( ), ( ),.. ) SQL >> SQL create table : id username dept birth email id username dept birth email CREATE TABLE member ( id NUMBER NOT NULL

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

FileMaker 15 ODBC 및 JDBC 설명서

FileMaker 15 ODBC 및 JDBC 설명서 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker, Inc... FileMaker.

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

FileMaker ODBC 및 JDBC 가이드

FileMaker ODBC 및 JDBC 가이드 FileMaker ODBC JDBC 2004-2019 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker, FileMaker Cloud, FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker,

More information

untitled

untitled (shared) (integrated) (stored) (operational) (data) : (DBMS) :, (database) :DBMS File & Database - : - : ( : ) - : - : - :, - DB - - -DBMScatalog meta-data -DBMS -DBMS - -DBMS concurrency control E-R,

More information

DBMS & SQL Server Installation Database Laboratory

DBMS & SQL Server Installation Database Laboratory DBMS & 조교 _ 최윤영 } 데이터베이스연구실 (1314 호 ) } 문의사항은 cyy@hallym.ac.kr } 과제제출은 dbcyy1@gmail.com } 수업공지사항및자료는모두홈페이지에서확인 } dblab.hallym.ac.kr } 홈페이지 ID: 학번 } 홈페이지 PW:s123 2 차례 } } 설치전점검사항 } 설치단계별설명 3 Hallym Univ.

More information

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

@OneToOne(cascade = = addr_id) private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a 1 대 1 단방향, 주테이블에외래키실습 http://ojcedu.com, http://ojc.asia STS -> Spring Stater Project name : onetoone-1 SQL : JPA, MySQL 선택 http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

목차 BUG 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG ROLLUP/CUBE 절을포함하는질의는 SUBQUE

목차 BUG 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG ROLLUP/CUBE 절을포함하는질의는 SUBQUE ALTIBASE HDB 6.3.1.10.1 Patch Notes 목차 BUG-45710 문법에맞지않는질의문수행시, 에러메시지에질의문의일부만보여주는문제를수정합니다... 3 BUG-45730 ROUND, TRUNC 함수에서 DATE 포맷 IW 를추가지원합니다... 5 BUG-45760 ROLLUP/CUBE 절을포함하는질의는 SUBQUERY REMOVAL 변환을수행하지않도록수정합니다....

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

More information

untitled

untitled MFC MFC MFC AppWizard 來 MFC MFC 類 了 類 Document/View MFC Visual C++ AppWizard MFC 不 力 亮 來 不 Document View 不 列 AppWizard View 類 CEditView 列 列 說 行 不 了 Document/View MFC Application Framework 靈 OLE Document

More information

Chapter 1

Chapter 1 3 Oracle 설치 Objectives Download Oracle 11g Release 2 Install Oracle 11g Release 2 Download Oracle SQL Developer 4.0.3 Install Oracle SQL Developer 4.0.3 Create a database connection 2 Download Oracle 11g

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

NoSQL

NoSQL MongoDB Daum Communications NoSQL Using Java Java VM, GC Low Scalability Using C Write speed Auto Sharding High Scalability Using Erlang Read/Update MapReduce R/U MR Cassandra Good Very Good MongoDB Good

More information

Lab 3. 실습문제 (Single linked list)_해답.hwp

Lab 3. 실습문제 (Single linked list)_해답.hwp Lab 3. Singly-linked list 의구현 실험실습일시 : 2009. 3. 30. 담당교수 : 정진우 담당조교 : 곽문상 보고서제출기한 : 2009. 4. 5. 학과 : 학번 : 성명 : 실습과제목적 : 이론시간에배운 Singly-linked list를실제로구현할수있다. 실습과제내용 : 주어진소스를이용해 Singly-linked list의각함수를구현한다.

More information

歯JavaExceptionHandling.PDF

歯JavaExceptionHandling.PDF (2001 3 ) from Yongwoo s Park Java Exception Handling Programming from Yongwoo s Park 1 Java Exception Handling Programming from Yongwoo s Park 2 1 4 11 4 4 try/catch 5 try/catch/finally 9 11 12 13 13

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started (ver 5.1) 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting

More information

CD-RW_Advanced.PDF

CD-RW_Advanced.PDF HP CD-Writer Program User Guide - - Ver. 2.0 HP CD-RW Adaptec Easy CD Creator Copier, Direct CD. HP CD-RW,. Easy CD Creator 3.5C, Direct CD 3.0., HP. HP CD-RW TEAM ( 02-3270-0803 ) < > 1. CD...3 CD...5

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

MS-SQL SERVER 대비 기능

MS-SQL SERVER 대비 기능 Business! ORACLE MS - SQL ORACLE MS - SQL Clustering A-Z A-F G-L M-R S-Z T-Z Microsoft EE : Works for benchmarks only CREATE VIEW Customers AS SELECT * FROM Server1.TableOwner.Customers_33 UNION ALL SELECT

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

RDB개요.ppt

RDB개요.ppt 1 2 3 < > 1 SQL SQL 2 SQL 3 column DEPT DEPT# DNAME BUDGET D1 D2 D3 Marketing Development Research 10M 12M 5M tuple EMP EMP# ENAME DEPT# SALARY D1 40 D1 45 E1 E2 E3 Lopez Cheng Finzi D2 30 E4 Satio D2

More information

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600 균형이진탐색트리 -VL Tree delson, Velskii, Landis에의해 1962년에제안됨 VL trees are balanced n VL Tree is a binary search tree such that for every internal node v of T, the heights of the children of v can differ by at

More information

(Humphery Kim) RAD Studio : h=p://tech.devgear.co.kr/ : h=p://blog.hjf.pe.kr/ Facebook : h=p://d.com/hjfactory :

(Humphery Kim) RAD Studio : h=p://tech.devgear.co.kr/ : h=p://blog.hjf.pe.kr/ Facebook : h=p://d.com/hjfactory : #2 (RAD STUDIO) In www.devgear.co.kr 2016.05.18 (Humphery Kim) RAD Studio : h=p://tech.devgear.co.kr/ : h=p://blog.hjf.pe.kr/ Facebook : h=p://d.com/hjfactory : hskim@embarcadero.kr 3! 1 - RAD, 2-3 - 4

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 14 5 5 5 5 6 6 6 7 7 7 8 8 8 9 9 10 10 11 11 12 12 12 12 12 13 13 14 15 16 17 18 18 19 19 20 20 20 21 21 21 22 22 22 22 23 24 24 24 24 25 27 27 28 29 29 29 29 30 30 31 31 31 32 1 1 1 1 1 1 1

More information

Contents. 1. PMD ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 2. Metrics ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 3. FindBugs ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 4. ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ

Contents. 1. PMD ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 2. Metrics ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 3. FindBugs ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 4. ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 정적분석서 - 영단어수집왕 - Team.# 3 과목명 소프트웨어모델링및분석 담당교수 유준범교수님 201011320 김용현 팀원 201111360 손준익 201111347 김태호 제출일자 2015-06-09 1 Contents. 1. PMD ㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍㆍ 2. Metrics

More information

교육2 ? 그림

교육2 ? 그림 Interstage 5 Apworks EJB Application Internet Revision History Edition Date Author Reviewed by Remarks 1 2002/10/11 2 2003/05/19 3 2003/06/18 EJB 4 2003/09/25 Apworks5.1 [ Stateless Session Bean ] ApworksJava,

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

슬라이드 제목 없음

슬라이드 제목 없음 Ch. 4 SQL (Sturctured Query Language) 2015.06 충북대학교경영정보학과조완섭 (wscho@chungbuk.ac.kr) 목차 - SQL2에서데이터정의, 제약조건및스키마변경 - SQL에서의기본질의 - 더복잡한 SQL 질의들 - SQL에서삽입, 삭제, 갱신구문 - SQL 뷰 - 주장으로추가적인제약조건명시 - SQL의부가적인기능들 Ch4

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

Lab 5. 실습문제 (Double linked list)-1_해답.hwp

Lab 5. 실습문제 (Double linked list)-1_해답.hwp Lab 5. Doubly-linked list 의구현 실험실습일시 : 2009. 4. 13. 담당교수 : 정진우 담당조교 : 곽문상 보고서제출기한 : 2009. 4. 19. 학과 : 학번 : 성명 : 실습과제목적 : 이론시간에배운 Doubly-linked list를실제로구현할수있다. 실습과제내용 : 주어진소스를이용해 Doubly-linked list의각함수를구현한다.

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

Microsoft Word - hci07-final-answer.doc

Microsoft Word - hci07-final-answer.doc 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 다음문장의내용이맞으면 True, 틀리면 False를표시하시오.

More information

Microsoft Word - hci08-final-answer.doc

Microsoft Word - hci08-final-answer.doc 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호를기입하면성적공고시학번대신암호를사용할것임. 1. 다음문장의내용이맞으면 True, 틀리면 False를표시하시오.

More information

Microsoft PowerPoint - 09-Object Oriented Programming-3.pptx

Microsoft PowerPoint - 09-Object Oriented Programming-3.pptx Development of Fashion CAD System 9. Object Oriented Programming-3 Sungmin Kim SEOUL NATIONAL UNIVERSITY Introduction Topics Object Oriented Programming (OOP) 정의 복수의 pattern object 로 이루어지는 새로운 class Pattern

More information

untitled

untitled PowerBuilder 連 Microsoft SQL Server database PB10.0 PB9.0 若 Microsoft SQL Server 料 database Profile MSS 料 (Microsoft SQL Server database interface) 行了 PB10.0 了 Sybase 不 Microsoft 料 了 SQL Server 料 PB10.0

More information

C++ Programming

C++ Programming C++ Programming 예외처리 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 예외처리 2 예외처리 예외처리 C++ 의예외처리 예외클래스와객체 3 예외처리 예외를처리하지않는프로그램 int main() int a, b; cout > a >> b; cout

More information

5장 MFC기반 다지기

5장 MFC기반 다지기 5 장 MFC 기반다지기 김성영교수 금오공과대학교 컴퓨터공학부 들어가기 (1) pp.132 ~ 138 비주얼스튜디오에서 MFC 어플리케이션작성 참조 시스템메뉴 메뉴 최소 / 최대 / 닫기버튼 툴바 대화상자 클라이언트영역 (Client Area) 스크롤바 상태표시줄 2 들어가기 (2) 3 들어가기 (3) 4 들어가기 (4) 솔루션탐색기확인 WinMain() 함수가없다?

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information

歯Lecture2.PDF

歯Lecture2.PDF VISUAL C++/MFC Lecture 2? Update Visual C ++/MFC Graphic Library OpenGL? Frame OpenGL 3D Graphic library coding CLecture1View? OpenGL MFC coding Visual C++ Project Settings Link Tap Opengl32lib, Glu32lib,

More information

InsertColumnNonNullableError(#colName) 에해당하는메시지출력 존재하지않는컬럼에값을삽입하려고할경우, InsertColumnExistenceError(#colName) 에해당하는메시지출력 실행결과가 primary key 제약에위배된다면, Ins

InsertColumnNonNullableError(#colName) 에해당하는메시지출력 존재하지않는컬럼에값을삽입하려고할경우, InsertColumnExistenceError(#colName) 에해당하는메시지출력 실행결과가 primary key 제약에위배된다면, Ins Project 1-3: Implementing DML Due: 2015/11/11 (Wed), 11:59 PM 이번프로젝트의목표는프로젝트 1-1 및프로젝트 1-2에서구현한프로그램에기능을추가하여간단한 DML을처리할수있도록하는것이다. 구현한프로그램은 3개의 DML 구문 (insert, delete, select) 을처리할수있어야한다. 테이블데이터는파일에저장되어프로그램이종료되어도사라지지않아야한다.

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C4C656D70656C2D5A69762E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C4C656D70656C2D5A69762E637070> /* */ /* LZWIN.C : Lempel-Ziv compression using Sliding Window */ /* */ #include "stdafx.h" #include "Lempel-Ziv.h" 1 /* 큐를초기화 */ void LZ::init_queue(void) front = rear = 0; /* 큐가꽉찼으면 1 을되돌림 */ int LZ::queue_full(void)

More information

1장 윈도우 프로그래밍 들어가기

1장 윈도우 프로그래밍 들어가기 1 장 윈도우프로그래밍들어가기 김성영교수 금오공과대학교 컴퓨터공학부 예제 다음프로그램은언제종료할까? #include #define QUIT -1 int Func(void) int i; cout > i; return i; void main(void) int Sum = 0, i; cout

More information

C++ Programming

C++ Programming C++ Programming 상속과다형성 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 상속의이해 상속과다형성 다중상속 2 상속과다형성 객체의이해 상속클래스의객체의생성및소멸 상속의조건 상속과다형성 다중상속 3 상속의이해 상속 (Inheritance) 클래스에구현된모든특성 ( 멤버변수와멤버함수 )

More information

Microsoft PowerPoint SQL 추가 기능

Microsoft PowerPoint SQL 추가 기능 데이터베이스 (Database) : 주장, 뷰, 프로그래밍기법 문양세강원대학교 IT특성화대학컴퓨터과학전공 강의내용 주장 (Assertions) 으로일반적인제약조건명시 SQL 에서뷰 ( 가상테이블 ) 데이터베이스프로그래밍 내포된 SQL (Embedded SQL) 함수호출, SQL/CLI [ 생략 ] 저장프로시저와 SQL/PSM [ 생략 ] 요약 Page 2 주장

More information

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O Orange for ORACLE V4.0 Installation Guide ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE...1 1....2 1.1...2 1.2...2 1.2.1...2 1.2.2 (Online Upgrade)...11 1.3 ORANGE CONFIGURATION ADMIN...12 1.3.1 Orange Configuration

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

어댑터뷰

어댑터뷰 04 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adatper View) 란? u 어댑터뷰의항목하나는단순한문자열이나이미지뿐만아니라, 임의의뷰가될수 있음 이미지뷰 u 커스텀어댑터뷰설정절차 1 2 항목을위한 XML 레이아웃정의 어댑터정의 3 어댑터를생성하고어댑터뷰객체에연결

More information

초보자를 위한 C# 21일 완성

초보자를 위한 C# 21일 완성 C# 21., 21 C#., 2 ~ 3 21. 2 ~ 3 21.,. 1~ 2 (, ), C#.,,.,., 21..,.,,, 3. A..,,.,.. Q&A.. 24 C#,.NET.,.,.,. Visual C# Visual Studio.NET,..,. CD., www. TeachYour sel f CSharp. com., ( )., C#.. C# 1, 1. WEEK

More information

윈도우시스템프로그래밍

윈도우시스템프로그래밍 객체지향프로그래밍응용 Chap 5. 사용자인터페이스 (#1) 2012.10.11. 오병우 컴퓨터공학과금오공과대학교 Contents Menu ToolBar DialogBar StatusBar MessageBox Mouse Cursor Program Icon CFormView Department of Computer Engineering 2 응용프로그램의처리제어

More information

Microsoft PowerPoint - C++ 5 .pptx

Microsoft PowerPoint - C++ 5 .pptx C++ 언어프로그래밍 한밭대학교전자. 제어공학과이승호교수 연산자중복 (operator overloading) 이란? 2 1. 연산자중복이란? 1) 기존에미리정의되어있는연산자 (+, -, /, * 등 ) 들을프로그래머의의도에맞도록새롭게정의하여사용할수있도록지원하는기능 2) 연산자를특정한기능을수행하도록재정의하여사용하면여러가지이점을가질수있음 3) 하나의기능이프로그래머의의도에따라바뀌어동작하는다형성

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* 비트의부분을뽑아내는함수 */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

초보자를 위한 ADO 21일 완성

초보자를 위한 ADO 21일 완성 ADO 21, 21 Sams Teach Yourself ADO 2.5 in 21 Days., 21., 2 1 ADO., ADO.? ADO 21 (VB, VBA, VB ), ADO. 3 (Week). 1, 2, COM+ 3.. HTML,. 3 (week), ADO. 24 1 - ADO OLE DB SQL, UDA(Universal Data Access) ADO.,,

More information

슬라이드 제목 없음

슬라이드 제목 없음 4.2 SQL 개요 SQL 개요 SQL은현재 DBMS 시장에서관계 DBMS가압도적인우위를차지하는데중요한요인의하나 SQL은 IBM 연구소에서 1974년에 System R이라는관계 DBMS 시제품을연구할때관계대수와관계해석을기반으로, 집단함수, 그룹화, 갱신연산등을추가하여개발된언어 1986년에 ANSI( 미국표준기구 ) 에서 SQL 표준을채택함으로써 SQL이널리사용되는데기여

More information

(Microsoft Word - \301\337\260\243\260\355\273\347.docx)

(Microsoft Word - \301\337\260\243\260\355\273\347.docx) 내장형시스템공학 (NH466) 중간고사 학번 : 이름 : 문제 배점 점수 1 20 2 20 3 20 4 20 5 10 6 10 7 15 8 20 9 15 합계 150 1. (20 점 ) 다음용어에대해서설명하시오. (1) 정보은닉 (Information Hiding) (2) 캡슐화 (Encapsulation) (3) 오버로딩 (Overloading) (4) 생성자

More information

Microsoft PowerPoint - 4(SQL-Data Definition,BasicQuery) [호환 모드]

Microsoft PowerPoint - 4(SQL-Data Definition,BasicQuery) [호환 모드] Chapter 4 SQL: 데이터정의, 제약사항, 기본질의와갱신 Copyright 2004 Pearson Education, Inc. 목차 4.1 SQL의데이터정의와데이터타입 4.2 SQL에서기본제약조건의명시 4.3 SQL에서의기본검색질의 4.4 SQL에서삽입, 삭제, 갱신문 4.5 SQL의기타기능 Slide 4-2 SQL 역사 System R의언어SEQUEL(Structured

More information

thesis

thesis ( Design and Implementation of a Generalized Management Information Repository Service for Network and System Management ) ssp@nile nile.postech.ac..ac.kr DPE Lab. 1997 12 16 GMIRS GMIRS GMIRS prototype

More information

Modern Javascript

Modern Javascript ES6 - Arrow Function Class Template String Destructuring Default, Rest, Spread let, const for..of Promises Module System Map, Set * Generator * Symbol * * https://babeljs.io/ Babel is a JavaScript compiler.

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting Started 'OZ

More information

UI TASK & KEY EVENT

UI TASK & KEY EVENT T9 & AUTOMATA 2007. 3. 23 PLATFORM TEAM 정용학 차례 T9 개요 새로운언어 (LDB) 추가 T9 주요구조체 / 주요함수 Automata 개요 Automata 주요함수 추후세미나계획 질의응답및토의 T9 ( 2 / 30 ) T9 개요 일반적으로 cat 이라는단어를쓸려면... 기존모드 (multitap) 2,2,2, 2,8 ( 총 6번의입력

More information

Microsoft PowerPoint - 10Àå.ppt

Microsoft PowerPoint - 10Àå.ppt 10 장. DB 서버구축및운영 DBMS 의개념과용어를익힌다. 간단한 SQL 문법을학습한다. MySQL 서버를설치 / 운영한다. 관련용어 데이터 : 자료 테이블 : 데이터를표형식으로표현 레코드 : 테이블의행 필드또는컬럼 : 테이블의열 필드명 : 각필드의이름 데이터타입 : 각필드에입력할값의형식 학번이름주소연락처 관련용어 DB : 테이블의집합 DBMS : DB 들을관리하는소프트웨어

More information

C프로-3장c03逞풚

C프로-3장c03逞풚 C h a p t e r 03 C++ 3 1 9 4 3 break continue 2 110 if if else if else switch 1 if if if 3 1 1 if 2 2 3 if if 1 2 111 01 #include 02 using namespace std; 03 void main( ) 04 { 05 int x; 06 07

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 5 장생성자와접근제어 1. 객체지향기법을이해한다. 2. 클래스를작성할수있다. 3. 클래스에서객체를생성할수있다. 4. 생성자를이용하여객체를초기화할수 있다. 5. 접근자와설정자를사용할수있다. 이번장에서만들어볼프로그램 생성자 생성자 (constructor) 는초기화를담당하는함수 생성자가필요한이유 #include using namespace

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

강의 개요

강의 개요 DDL TABLE 을만들자 웹데이터베이스 TABLE 자료가저장되는공간 문자자료의경우 DB 생성시지정한 Character Set 대로저장 Table 생성시 Table 의구조를결정짓는열속성지정 열 (Clumn, Attribute) 은이름과자료형을갖는다. 자료형 : http://dev.mysql.cm/dc/refman/5.1/en/data-types.html TABLE

More information

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS ( PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (http://ddns.hanwha-security.com) Step 1~5. Step, PC, DVR Step 1. Cable Step

More information

Chapter_02-3_NativeApp

Chapter_02-3_NativeApp 1 TIZEN Native App April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 목차 2 Tizen EFL Tizen EFL 3 Tizen EFL Enlightment Foundation Libraries 타이젠핵심코어툴킷 Tizen EFL 4 Tizen

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT

3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT 3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT NOT NULL, FOREIGN KEY (parent_id) REFERENCES Comments(comment_id)

More information

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures 단일연결리스트 (Singly Linked List) 신찬수 연결리스트 (linked list)? tail 서울부산수원용인 null item next 구조체복습 struct name_card { char name[20]; int date; } struct name_card a; // 구조체변수 a 선언 a.name 또는 a.date // 구조체 a의멤버접근 struct

More information

chap01_time_complexity.key

chap01_time_complexity.key 1 : (resource),,, 2 (time complexity),,, (worst-case analysis) (average-case analysis) 3 (Asymptotic) n growth rate Θ-, Ο- ( ) 4 : n data, n/2. int sample( int data[], int n ) { int k = n/2 ; return data[k]

More information

5.스택(강의자료).key

5.스택(강의자료).key CHP 5: https://www.youtube.com/watch?v=ns-r91557ds ? (stack): (LIFO:Last-In First-Out):. D C B C B C B C B (element) C (top) B (bottom) (DT) : n element : create() ::=. is_empty(s) ::=. is_full(s) ::=.

More information